This part of own Q&A serial of posts which shares knowledge gained during work on one project

It is not obvious about how to get a just minted token id. You may assume there would be a transaction on chain which could be queried and token id could be extracted then from it, but is there other options?

1 Answer 1


ERC721 standard allows to have Enumerable interface which gives access to token ids.

Although, there is well known security attack on its concept and implementation by overusing balanceOf() call (or may be something different).

Another option is query events for this contract and search of returned results for pair user-tokenId.

Finally we can store a minted token id in the separate special storage by extending own ERC721 contract implementation.

Your Answer

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

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