ERC-1155 function
safeTransferFrom(address,address,uint256,uint256,bytes)
Transfers one ERC-1155 token ID and amount, with a receiver safety check.
- Selector
- 0xf242432a
- Mutability
- nonpayable
Generate safeTransferFrom calldata
Edit the example inputs to rebuild the bytes instantly in your browser. Nothing is sent and no transaction is submitted.
address
address
uint256
uint256
bytes
calldata196 bytes
sel0xf242432a
safeTransferFrom(address,address,uint256,uint256,bytes)
0x000000000000000000000000001111111111111111111111111111111111111111
from · address =0x11111111…111111
0x200000000000000000000000002222222222222222222222222222222222222222
to · address =0x22222222…222222
0x40000000000000000000000000000000000000000000000000000000000000002a
id · uint256 =42
0x600000000000000000000000000000000000000000000000000000000000000001
amount · uint256 =1
0x8000000000000000000000000000000000000000000000000000000000000000a0
→ data, points to0xa0
0xa00000000000000000000000000000000000000000000000000000000000000000
data · length =0 bytes
How safeTransferFrom works
The caller must own the tokens or be approved for the from account. Contract recipients must accept the transfer through onERC1155Received.
Parameters
| Name | Solidity type | Meaning |
|---|---|---|
| from | address | Account whose token balance should decrease. |
| to | address | Recipient account or receiving contract. |
| id | uint256 | Token type to transfer. |
| amount | uint256 | Quantity of that token type. |
| data | bytes | Application-specific bytes forwarded to a contract recipient. |