[SUGGESTION OF FIX] "TypeError: customChains is not iterable" When verifying contract.
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, typescript
- Lĩnh vực
- blockchain, devtools
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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: [],
},
- Ngôn ngữ chính
- JavaScript
- Star
- 1.3k
- Fork
- 510
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của smartcontractkit/hardhat-starter-kit
-
Best trading opportunityĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
-
Consider upgrading to ethers v6Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
smartcontractkit/hardhat-starter-kit#197 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
smartcontractkit/hardhat-starter-kit#190 · 4 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
smartcontractkit/hardhat-starter-kit#188 · 1 bình luận ·
-
Duplicate definition of TransferCó thể làm lại được @andrejrakic đã nhận 970 ngày trước và không có pull request nào đang mở. Đang mở
smartcontractkit/hardhat-starter-kit#182 · 2 bình luận · 1 người được giao ·
Tất cả issue của smartcontractkit/hardhat-starter-kit
Issue tương tự
-
[ordering-review] workshop order graph: 1 confirmed ordering issue, cycles are false positivesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
githubnext/gh-aw-workshop#6247 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue type/ci
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 81/100
c-w-z/commit-decision-record#20 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: China en Vivo (CN)Đang mởchannels:add check:passed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
web-platform-tests/wpt#65844 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
JuliusBrussee/caveman#1606 ·
Maintainer thường phản hồi trong vòng 1 ngày