I’m having a hard time trying to figure out how to get the transaction details after I mint an NFT.
The best scenario fo me would be to store it on the contract, right after the mint Transfer(), but as far as I know there’s no transaction details yet.
I know there are the events that can be catched on JavaScript, but I don’t want to store anything off-chain.
Second best would be to get the transaction hash using the token ID, but I can’t find anything in the ERC721 implementation linking the two.
I guess there should be a way to query the blockchain for the contract’s transactions…???
Couldn’t find it yet…
Hi!
It’s just for some randomization.
I understand now that transactions are stored on the log, not available to the contract, so I’m using the block hash for that purpose.
Thanks,
Roger
We are looking to get the transaction hash as well for identification purposes.. Is it possible to get the TransactionHash from the _safemint call while in the contract function?
we can catch it in our client/web3 after the transaction but we ideally would want to process it for our needs in the contract at the time of minting..