提交了 Challenge #0,没通过
https://speedruneth-challenge0.vercel.app/myNFTs
使用 sepolia testnet,欢迎大家来 mint
好奇这个 dApp 判定系统是怎么运作的
提交后反馈
This submission did not pass all tests. Review the output below to see which tests failed and why. Viewing the file that is used for testing (packages/hardhat/test/Challenge0.ts) may help you find the exact section in which the tests failed.
After fixing the issues please resubmit the challenge. If you are still having issues, join the challenge Telegram channel.
–
TypeError: Function has override specified but does not override anything.
→ contracts/download-0x36efdc7f9e2ee2c2084c5aace8070ae711f9b04e.sol:40:13:
|
40 | ) internal override(ERC721, ERC721Enumerable) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Invalid contracts specified in override list: “ERC721” and “ERC721Enumerable”.
→ contracts/download-0x36efdc7f9e2ee2c2084c5aace8070ae711f9b04e.sol:40:13:
|
40 | ) internal override(ERC721, ERC721Enumerable) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: This contract:
→ @openzeppelin/contracts/token/ERC721/ERC721.sol:19:1:
|
19 | contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
| ^ (Relevant source part starts here and spans across multiple lines).
Note: This contract:
→ @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol:14:1:
|
14 | abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
| ^ (Relevant source part starts here and spans across multiple lines).
TypeError: Function needs to specify overridden contract “ERC721URIStorage”.
→ contracts/download-0x36efdc7f9e2ee2c2084c5aace8070ae711f9b04e.sol:58:16:
|
58 | ) public view override(ERC721, ERC721Enumerable) returns (bool) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: This contract:
→ @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol:12:1:
|
12 | abstract contract ERC721URIStorage is IERC4906, ERC721 {
| ^ (Relevant source part starts here and spans across multiple lines).
TypeError: Derived contract must override function “_beforeTokenTransfer”. Two or more base classes define function with same name and parameter types.
→ contracts/download-0x36efdc7f9e2ee2c2084c5aace8070ae711f9b04e.sol:10:1:
|
10 | contract YourCollectible is
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Definition in “ERC721”:
→ @openzeppelin/contracts/token/ERC721/ERC721.sol:437:5:
|
437 | function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: Definition in “ERC721Enumerable”:
→ @openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol:60:5:
|
60 | function _beforeTokenTransfer(
| ^ (Relevant source part starts here and spans across multiple lines).
TypeError: Wrong argument count for function call: 3 arguments given but expected 4.
→ contracts/download-0x36efdc7f9e2ee2c2084c5aace8070ae711f9b04e.sol:41:3:
|
41 | super._beforeTokenTransfer(from, to, tokenId);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error HH600: Compilation failed
HardhatError: HH600: Compilation failed
at SimpleTaskDefinition.action (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/builtin-tasks/compile.ts:499:15)
at async Environment._runTaskDefinition (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
at async OverriddenTaskDefinition._action (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/@typechain/hardhat/src/index.ts:28:30)
at async Environment._runTaskDefinition (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
at async Environment.run (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:191:14)
at async SimpleTaskDefinition.action (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/builtin-tasks/compile.ts:1424:63)
at async Environment._runTaskDefinition (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
at async Environment.run (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:191:14)
at async SimpleTaskDefinition.action (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/builtin-tasks/compile.ts:1504:7)
at async Environment._runTaskDefinition (/home/ubuntu/speedrun-grader/challenge-0-simple-nft/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)