Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
superwunc committed Jun 17, 2024
1 parent ba97fc7 commit 850f374
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 9 deletions.
31 changes: 27 additions & 4 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

45 changes: 41 additions & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,63 @@ export async function run(): Promise<void> {
allContractAddress.push(m[0])
}
}
console.log('allContractAddress', allContractAddress.length)
const contractAddressGroup = _.chunk(allContractAddress, 5)
if (contractAddressGroup.length > 0) {
for (let i = 0, l = contractAddressGroup.length; i < l; i++) {
const contractAddress = contractAddressGroup[i]
// console.log('allContractAddress', contractAddress)
const response = await fetch(
// console.log('allContractAddress', contractAddress)
let response = await fetch(
`https://api.bscscan.com/api?module=contract&action=getcontractcreation&contractaddresses=${contractAddress.join(',')}&apikey=QY72EPJVK99S1WHIE5QHCCSEBTX2NFWJT3`
)
if (response.ok) {
const data: any = await response.json()

Check failure on line 52 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected any. Specify a different type

Check failure on line 52 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected any. Specify a different type
if (data.status === '1') {
data.result.forEach((item: any) => {

Check failure on line 54 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Prefer for...of instead of Array.forEach

Check failure on line 54 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected any. Specify a different type

Check failure on line 54 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Prefer for...of instead of Array.forEach

Check failure on line 54 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected any. Specify a different type
if (
item.contractCreator !==
'0x0cdb34e6a4d635142bb92fe403d38f636bbb77b8'
) {
console.log(
'BSC ' + item.contractAddress,

Check failure on line 60 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected string concatenation

Check failure on line 60 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected string concatenation
'Contract Creator is ' + item.contractCreator

Check failure on line 61 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected string concatenation

Check failure on line 61 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected string concatenation
)
}
})
}
}
response = await fetch(
`https://api.etherscan.io/api?module=contract&action=getcontractcreation&contractaddresses=${contractAddress.join(',')}&apikey=2GSHW7BZXKR9EDV8GW5PF59F9DVCNHETFS`
)
if (response.ok) {
const data: any = await response.json()

Check failure on line 71 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected any. Specify a different type

Check failure on line 71 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected any. Specify a different type
if (data.status === '1') {
data.result.forEach((item: any) => {

Check failure on line 73 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Prefer for...of instead of Array.forEach

Check failure on line 73 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected any. Specify a different type

Check failure on line 73 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Prefer for...of instead of Array.forEach

Check failure on line 73 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected any. Specify a different type
if (
item.contractCreator !==
'0x0cdb34e6a4d635142bb92fe403d38f636bbb77b8'
) {
console.log(
'ETH ' + item.contractAddress,

Check failure on line 79 in src/main.ts

View workflow job for this annotation

GitHub Actions / Lint Codebase

Unexpected string concatenation

Check failure on line 79 in src/main.ts

View workflow job for this annotation

GitHub Actions / TypeScript Tests

Unexpected string concatenation
'Contract Creator is ' + item.contractCreator
)
}
})
}
}

response = await fetch(
`https://api-optimistic.etherscan.io/api?module=contract&action=getcontractcreation&contractaddresses=${contractAddress.join(',')}&apikey=5WFY5FU9EHZUA6BITY65YBI1G6HJC8FDD7`
)
if (response.ok) {
const data: any = await response.json()
if (data.status === '1') {
data.result.forEach((item: any) => {
if (
item.contractCreator !==
'0x0cdb34e6a4d635142bb92fe403d38f636bbb77b8'
) {
console.log(
'BSC' + item.contractAddress,
'OPT ' + item.contractAddress,
'Contract Creator is ' + item.contractCreator
)
}
Expand Down

0 comments on commit 850f374

Please sign in to comment.