ERC-1155 function
balanceOf(address,uint256)
Returns one account’s balance for one ERC-1155 token ID.
- Selector
- 0x00fdd58e
- Mutability
- view
Generate balanceOf calldata
Edit the example inputs to rebuild the bytes instantly in your browser. Nothing is sent and no transaction is submitted.
address
uint256
calldata68 bytes
sel0x00fdd58e
balanceOf(address,uint256)
0x000000000000000000000000001111111111111111111111111111111111111111
account · address =0x11111111…111111
0x20000000000000000000000000000000000000000000000000000000000000002a
id · uint256 =42
How balanceOf works
ERC-1155 balances are keyed by both account and token ID, so both values are encoded.
Parameters
| Name | Solidity type | Meaning |
|---|---|---|
| account | address | Address whose balance should be read. |
| id | uint256 | Token type to query. |
Return value
The account’s balance for that token ID.
uint256 resultReturn data comes back after execution and is not included in the calldata above.