【发布时间】:2023-01-31 23:21:38
【问题描述】:
当我尝试用 37 个 NFT 序列号调用TokenBurnTransaction() 时,出现返回错误BATCH_SIZE_LIMIT_EXCEEDED.因此,我想知道在单个函数调用中我可以燃烧的最大量是多少。
【问题讨论】:
标签: javascript nft hedera-hashgraph
当我尝试用 37 个 NFT 序列号调用TokenBurnTransaction() 时,出现返回错误BATCH_SIZE_LIMIT_EXCEEDED.因此,我想知道在单个函数调用中我可以燃烧的最大量是多少。
【问题讨论】:
标签: javascript nft hedera-hashgraph
您可以在单个交易调用中铸造或销毁的最大序列数为 10。
请参阅此代码示例:
// BURN 10 SERIALS IN THE NFT COLLECTION
let tokenBurnTx = await new TokenBurnTransaction()
.setTokenId(tokenId)
.setSerials([1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
.freezeWith(client)
.sign(supplyKey);
let tokenBurnSubmit = await tokenBurnTx.execute(client);
如果您检查相应交易的镜像节点 REST API,您将看到所有 10 个铸币/销毁。
REST API(测试网每季度重置一次,因此您将来可能看不到确切的结果):https://testnet.mirrornode.hedera.com/api/v1/transactions/0.0.1218-1675178140-095602422 这是镜像节点信息的一部分:
{
"transactions": [
{
"bytes": null,
"charged_tx_fee": 2546089,
"consensus_timestamp": "1675178151.645157386",
"entity_id": "0.0.3072409",
"max_fee": "10000000000",
"memo_base64": "",
"name": "TOKENBURN",
"nft_transfers": [
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 1,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 2,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 3,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 4,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 5,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 6,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 7,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 8,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 9,
"token_id": "0.0.3072409"
},
{
"is_approval": false,
"receiver_account_id": null,
"sender_account_id": "0.0.23223",
"serial_number": 10,
"token_id": "0.0.3072409"
}
],
"node": "0.0.5",
"nonce": 0,
"parent_consensus_timestamp": null,
"result": "SUCCESS",
【讨论】: