Transaction hashes of a NFT

Hello!

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…

Any help is appreciated.
Thanks!

1 Like

Hi @rsodre,

Taking a step back, why do you need/want the transaction details for the NFT?
Can you explain your use case a bit more.

When you mint, you can see the transactions in Etherscan.

You could have a look at the following tutorial: Create an NFT and deploy to a public testnet, using Truffle

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

1 Like

Hi @rsodre,

Please note, we can’t get randomization onchain unless we use an offchain source.