[SUGGESTION OF FIX] "TypeError: customChains is not iterable" When verifying contract.
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- javascript, typescript
- 領域
- blockchain, devtools
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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: [],
},
- 主要言語
- JavaScript
- スター
- 1.3k
- フォーク
- 510
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
smartcontractkit/hardhat-starter-kit のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 1/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
smartcontractkit/hardhat-starter-kit#197 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
smartcontractkit/hardhat-starter-kit#190 · コメント 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
smartcontractkit/hardhat-starter-kit#188 · コメント 1 件 ·
-
Duplicate definition of Transfer再び着手できるかも @andrejrakic が 970 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
smartcontractkit/hardhat-starter-kit#182 · コメント 2 件 · 担当者 1 名 ·
smartcontractkit/hardhat-starter-kit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
githubnext/gh-aw-workshop#6247 ·
メンテナーはふだん 1 日以内に返信
-
good first issue type/ci
難易度 2/5 1〜3時間 初心者へのやさしさ 81/100
c-w-z/commit-decision-record#20 ·
メンテナーはふだん 1 日以内に返信
-
channels:add check:passed
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
web-platform-tests/wpt#65844 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JuliusBrussee/caveman#1606 ·
メンテナーはふだん 1 日以内に返信