chainlink-dynamic-nft-alchemy
chainlink-dynamic-nft-alchemy copied to clipboard
TypeError Function has override specified but does not override anything
TypeError: Function has override specified but does not override anything. --> contracts/BullBear.sol:69:24: | 69 | ) internal virtual override
old
// The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); }
new
`
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
override(ERC721, ERC721Enumerable)
{
super._beforeTokenTransfer(from, to, tokenId, batchSize);
}
`
I also can't compile, tried different versions, @zeuslawyer please help

Can you share your smart contract to see the imports? I think it is not recognizing the parent smart contract ERC721Enumerable.
I see a detail, can be that way The original function inside ERC721Enumerable parent contract imported from openzeppelin has 4 inputs parameters in its function. in your github contract, you call it with 3 values looks like you are missing batchSize
@sheva323 I am using code from this branch - https://github.com/zeuslawyer/chainlink-dynamic-nft-alchemy/blob/price-feeds/contracts/Bull&Bear.sol didn't change it
Ohh I see, the additional parameter in one little solution, it takes off some errors, but there still the error appearing. Im trying to test here.
Would be cool if you can fix it, I would continue lesson;) Noob in Solidity for now to understand how to fix all 😄
it's actually strange, it shouldn't have problems.
I see a detail, can be that way The original function inside ERC721Enumerable parent contract imported from openzeppelin has 4 inputs parameters in its function. in your github contract, you call it with 3 values looks like you are missing batchSize
did it, it helped to compile, thanks 🙏 @jackluo2012
@zeuslawyer would be good to add this fix to repo, and update Alchemy course, so new people won't face problems