compound-finance / comet

An efficient money market protocol for Ethereum and compatible chains (aka Compound III, Compound v3).
Other
257 stars 148 forks source link

Spider tool can't crawl base with basic infura key #825

Open peersky opened 9 months ago

peersky commented 9 months ago

Running

hardhat spider --network base --deployment usdc

provides error

An unexpected error occurred:

Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)
    at Logger.makeError (/Users/timoz/OZGit/compound-monitoring-v3/address-generator/comet/node_modules/@ethersproject/logger/src.ts/index.ts:269:28)
    at Logger.throwError (/Users/timoz/OZGit/compound-monitoring-v3/address-generator/comet/node_modules/@ethersproject/logger/src.ts/index.ts:281:20)
    at EthersProviderWrapper.<anonymous> (/Users/timoz/OZGit/compound-monitoring-v3/address-generator/comet/node_modules/@ethersproject/providers/src.ts/json-rpc-provider.ts:483:23)
    at step (/Users/timoz/OZGit/compound-monitoring-v3/address-generator/comet/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:48:23)
    at Object.throw (/Users/timoz/OZGit/compound-monitoring-v3/address-generator/comet/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:29:53)
    at rejected (/Users/timoz/OZGit/compound-monitoring-v3/address-generator/comet/node_modules/@ethersproject/providers/lib/json-rpc-provider.js:21:65)
    at processTicksAndRejections (node:internal/process/task_queues:95:5) {
  reason: 'could not detect network',
  code: 'NETWORK_ERROR',
  event: 'noNetwork'
}

Obviously because RPC is defined by INFURA_KEY while Infura does not support base yet.

image

It would be more reliable if RPC_URL could be supplied generally, instead of relying on a particular provider.

peersky commented 9 months ago

Checked the hardhat code. It's just missing in readme that for base one needs to define QUICKNODE_KEY . Using generic BASE_RPC_URL would still be best for more wider provider scope.