How to read all the tokens ids right after minting?

Token IDs are stored under the log’s topics 3rd array element such as below.


where receipt is the receipt variable for your transaction. So, if you’re only minting one token with one token ID, you should read receipt.logs[0].topics[3] and to convert the value to integer, you wrap it with BigInt(receipt.logs[0].topics[3]).toString().

If you are doing bulk minting, to read multiple token IDs, you may use the Javascript code below.

let logId = [];

// Take only array element with index of even number
logId = receipt.logs.filter((element, index) => index % 2 == 0);

// Read each token Id from receipt and save into tokenId array
for (let i = 0; i < recipientAddressValue.length; i++) {