forked from ensdomains/evmgateway
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix providers type, expose test/chains.ts
- Loading branch information
Showing
4 changed files
with
232 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { CHAINS } from '../src/chains.js'; | ||
import { CHAIN_MAP, providerURL } from './providers.js'; | ||
|
||
// | ||
|
||
const usingPublic: string[] = []; | ||
const leftoverChains = new Set<bigint>(Object.values(CHAINS)); | ||
|
||
for (const info of CHAIN_MAP.values()) { | ||
leftoverChains.delete(info.chain); | ||
const url = providerURL(info.chain); | ||
console.log( | ||
info.chain.toString().padStart(8), | ||
info.name.padEnd(16), | ||
`[${info.alchemy ? 'A' : ' '}${info.infura ? 'I' : ' '}${info.ankr ? 'K' : ' '}]`, | ||
url === info.rpc ? '!' : ' ', | ||
url | ||
); | ||
if (url === info.rpc) { | ||
usingPublic.push(info.name); | ||
} | ||
} | ||
|
||
if (usingPublic.length) { | ||
console.log(`\x1B[31mWARNING!\x1B[0m ${usingPublic.length} using public!`); | ||
console.log(usingPublic); | ||
} | ||
|
||
if (leftoverChains.size) { | ||
console.log(leftoverChains); | ||
throw new Error('missing ChainInfo'); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.