enter image description here

I need help im new and can figure out what is wrong

  • Can you include all your smart contract code? Apr 20, 2022 at 14:04

1 Answer 1


The increment() function does not return a value. This can be seen from the Counters class (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.5.0/contracts/utils/Counters.sol)

Make code like this:

uint256 tokenId = _tokenIdCounter.current();
_safeMint(before, tokenId);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.