[SUGGESTION OF FIX] "TypeError: customChains is not iterable" When verifying contract.
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, typescript
- Ambito
- blockchain, devtools
Direzione di ricerca
Start at hardhat.config.ts around line 73 and review the etherscan configuration used by the verification commands shown in the issue. Run the TypeScript verification flow and the hardhat verify command on a configured network; done means both no longer fail with the reported customChains or verifyAllowedChains errors.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
PROBLEM
I get the next error when running 'verify' on typescript:
TypeError: customChains is not iterable
at getEtherscanEndpoints (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/@nomiclabs/hardhat-etherscan/src/network/prober.ts:33:37)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Environment._runTaskDefinition (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
at async Environment.run (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
at async SimpleTaskDefinition.verifySubtask [as action] (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/@nomiclabs/hardhat-etherscan/src/index.ts:209:30)
at async Environment._runTaskDefinition (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:14)
at async Environment.run (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:14)
at async verify (/Users/facundocastello/projects/hardhat-starter-kit/helper-functions.ts:46:9)
at async Object.deployFunction [as func] (/Users/facundocastello/projects/hardhat-starter-kit/deploy/13_Deploy_BasicNFT.ts:30:9)
at async DeploymentsManager.executeDeployScripts (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1220:22
another error that you can see for the same reason is when running yarn hardhat verify --network <NETWORK> <CONTRACT_ADDRESS> <CONSTRUCTOR_PARAMETERS> is the next one:
TypeError: Cannot read properties of undefined (reading 'map')
at verifyAllowedChains (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/@nomiclabs/hardhat-etherscan/src/config.ts:20:53)
at SimpleTaskDefinition.verify (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/@nomiclabs/hardhat-etherscan/src/index.ts:152:22)
at Environment._runTaskDefinition (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:308:35)
at Environment.run (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/hardhat/src/internal/core/runtime-environment.ts:156:25)
at main (/Users/facundocastello/projects/hardhat-starter-kit/node_modules/hardhat/src/internal/cli/cli.ts:272:17)
the solution is the same one.
SOLUTION
The fix is to add customChains: [], afther the element on this line:
https://github.com/smartcontractkit/hardhat-starter-kit/blob/ca2bd3d1de672005c8db0fe747c659724e174a32/hardhat.config.ts#L73
so it will be like this
etherscan: {
// yarn hardhat verify --network <NETWORK> <CONTRACT_ADDRESS> <CONSTRUCTOR_PARAMETERS>
apiKey: {
polygon: POLYGONSCAN_API_KEY,
goerli: ETHERSCAN_API_KEY,
},
customChains: [],
},
- Lingua principale
- JavaScript
- Stelle
- 1.3k
- Fork
- 510
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di smartcontractkit/hardhat-starter-kit
-
Best trading opportunityAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
smartcontractkit/hardhat-starter-kit#197 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
smartcontractkit/hardhat-starter-kit#190 · 4 commenti ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
smartcontractkit/hardhat-starter-kit#188 · 1 commento ·
-
Duplicate definition of TransferForse di nuovo libera @andrejrakic l’ha presa 970 giorni fa e non c’è nessuna pull request aperta. Aperta
smartcontractkit/hardhat-starter-kit#182 · 2 commenti · 1 assegnatario ·
Tutte le issue di smartcontractkit/hardhat-starter-kit
Issue simili
-
[ordering-review] workshop order graph: 1 confirmed ordering issue, cycles are false positivesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
githubnext/gh-aw-workshop#6247 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue type/ci
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
c-w-z/commit-decision-record#20 ·
I maintainer di solito rispondono entro 1 giorno
-
Add: China en Vivo (CN)Apertachannels:add check:passed
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
web-platform-tests/wpt#65844 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
JuliusBrussee/caveman#1606 ·
I maintainer di solito rispondono entro 1 giorno