ERC-1155 function
safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)
Transfers multiple ERC-1155 token IDs and amounts in one safe batch.
- Selector
- 0x2eb2c2d6
- Mutability
- nonpayable
Generate safeBatchTransferFrom calldata
Edit the example inputs to rebuild the bytes instantly in your browser. Nothing is sent and no transaction is submitted.
address
address
bytes
calldata388 bytes
sel0x2eb2c2d6
safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)
0x000000000000000000000000001111111111111111111111111111111111111111
from · address =0x11111111…111111
0x200000000000000000000000002222222222222222222222222222222222222222
to · address =0x22222222…222222
0x4000000000000000000000000000000000000000000000000000000000000000a0
→ ids, points to0xa0
0x600000000000000000000000000000000000000000000000000000000000000100
→ amounts, points to0x100
0x800000000000000000000000000000000000000000000000000000000000000160
→ data, points to0x160
0xa00000000000000000000000000000000000000000000000000000000000000002
ids · length =2 elements
0xc0000000000000000000000000000000000000000000000000000000000000002a
ids[0] · uint256 =42
0xe00000000000000000000000000000000000000000000000000000000000000063
ids[1] · uint256 =99
0x1000000000000000000000000000000000000000000000000000000000000000002
amounts · length =2 elements
0x1200000000000000000000000000000000000000000000000000000000000000001
amounts[0] · uint256 =1
0x1400000000000000000000000000000000000000000000000000000000000000005
amounts[1] · uint256 =5
0x1600000000000000000000000000000000000000000000000000000000000000000
data · length =0 bytes
How safeBatchTransferFrom works
Each ids entry is paired with the amount at the same index. Contract recipients must accept the complete batch through onERC1155BatchReceived.
Parameters
| Name | Solidity type | Meaning |
|---|---|---|
| from | address | Account whose token balances should decrease. |
| to | address | Recipient account or receiving contract. |
| ids | uint256[] | Token types to transfer. |
| amounts | uint256[] | Quantities paired positionally with ids. |
| data | bytes | Application-specific bytes forwarded to a contract recipient. |