You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERC721Tocken.sol is giving compilation error
TypeError: Function has override specified but does not override anything.
--> contracts/tokens/ERC721Token.sol:59:22:
|
59 | ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Invalid contracts specified in override list: "ERC721", "ERC721Enumerable" and "ERC721Pausable".
--> contracts/tokens/ERC721Token.sol:59:22:
|
59 | ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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).
Note: This contract:
--> @openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol:22:1:
|
22 | abstract contract ERC721Pausable is ERC721, Pausable {
| ^ (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/tokens/ERC721Token.sol:15:1:
|
15 | contract ERC721Token is Ownable, ER ... lementer, AccessControlEnumerable {
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Definition in "ERC721":
--> @openzeppelin/contracts/token/ERC721/ERC721.sol:467:5:
|
467 | function _beforeTokenTransfer(
| ^ (Relevant source part starts here and spans across multiple lines).
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).
Note: Definition in "ERC721Pausable":
--> @openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol:30:5:
|
30 | function _beforeTokenTransfer(
| ^ (Relevant source part starts here and spans across multiple lines).
Error HH600: Compilation failed
For more info go to https://hardhat.org/HH600 or run Hardhat with --show-stack-traces
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lseg@1.0.0 compile: npx hardhat compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lseg@1.0.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sajal-garg-ion/.npm/_logs/2023-05-04T06_30_11_896Z-debug.log
sajal-garg-ion@AS-3Q5V9V3-L:/mnt/c/Sajal/Blockchain/lseg-dmi-poc$ npm run compile
For more info go to https://hardhat.org/HH600 or run Hardhat with --show-stack-traces
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lseg@1.0.0 compile: npx hardhat compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lseg@1.0.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Expected Behavior
No Compilation error
We fixed it by fixing overridden function
Current Behavior
Possible Solution
We fixed it by fixing overridden function
Steps to Reproduce (for bugs)
Context
Your Environment
Version used:
Environment name and version (e.g. node 12 on macos):
Server type and version:
Operating System and version:
Link to your project:
The text was updated successfully, but these errors were encountered:
ERC721Tocken.sol is giving compilation error
TypeError: Function has override specified but does not override anything.
--> contracts/tokens/ERC721Token.sol:59:22:
|
59 | ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Invalid contracts specified in override list: "ERC721", "ERC721Enumerable" and "ERC721Pausable".
--> contracts/tokens/ERC721Token.sol:59:22:
|
59 | ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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).
Note: This contract:
--> @openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol:22:1:
|
22 | abstract contract ERC721Pausable is ERC721, Pausable {
| ^ (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/tokens/ERC721Token.sol:15:1:
|
15 | contract ERC721Token is Ownable, ER ... lementer, AccessControlEnumerable {
| ^ (Relevant source part starts here and spans across multiple lines).
Note: Definition in "ERC721":
--> @openzeppelin/contracts/token/ERC721/ERC721.sol:467:5:
|
467 | function _beforeTokenTransfer(
| ^ (Relevant source part starts here and spans across multiple lines).
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).
Note: Definition in "ERC721Pausable":
--> @openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol:30:5:
|
30 | function _beforeTokenTransfer(
| ^ (Relevant source part starts here and spans across multiple lines).
Error HH600: Compilation failed
For more info go to https://hardhat.org/HH600 or run Hardhat with --show-stack-traces
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lseg@1.0.0 compile:
npx hardhat compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lseg@1.0.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/sajal-garg-ion/.npm/_logs/2023-05-04T06_30_11_896Z-debug.log
sajal-garg-ion@AS-3Q5V9V3-L:/mnt/c/Sajal/Blockchain/lseg-dmi-poc$ npm run compile
ParserError: Unexpected trailing comma in parameter list.
--> contracts/tokens/ERC721Token.sol:59:23:
|
59 | uint256 tokenId2,
| ^
Error HH600: Compilation failed
For more info go to https://hardhat.org/HH600 or run Hardhat with --show-stack-traces
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lseg@1.0.0 compile:
npx hardhat compile
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lseg@1.0.0 compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
Expected Behavior
No Compilation error
We fixed it by fixing overridden function
Current Behavior
Possible Solution
We fixed it by fixing overridden function
Steps to Reproduce (for bugs)
Context
Your Environment
The text was updated successfully, but these errors were encountered: