Skip to content

Solidity API

SpanningERC1155Supply

_Extension of ERC1155 that adds tracking of total supply per id.

Useful for scenarios where Fungible and Non-fungible tokens have to be clearly identified. Note: While a totalSupply of 1 might mean the corresponding is an NFT, there is no guarantees that no other token with the same id are not going to be minted._

totalSupply_

mapping(uint256 => uint256) totalSupply_

totalSupply

function totalSupply(uint256 id) public view virtual returns (uint256)

Total amount of tokens in with a given id.

exists

function exists(uint256 id) public view virtual returns (bool)

Indicates whether any token exist with a given id, or not.

_beforeTokenTransfer

function _beforeTokenTransfer(bytes32 operator, bytes32 senderAddress, bytes32 receiverAddress, uint256[] ids, uint256[] amounts, bytes data) internal virtual

_See {ERC1155-beforeTokenTransfer}.