IERC1155.sol 1.3 KB

1234567891011121314151617181920212223242526272829
  1. pragma solidity ^0.6.0;
  2. import "../../introspection/IERC165.sol";
  3. /**
  4. @title ERC-1155 Multi Token Standard basic interface
  5. @dev See https://eips.ethereum.org/EIPS/eip-1155
  6. */
  7. abstract contract IERC1155 is IERC165 {
  8. event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
  9. event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);
  10. event ApprovalForAll(address indexed account, address indexed operator, bool approved);
  11. event URI(string value, uint256 indexed id);
  12. function balanceOf(address account, uint256 id) public view virtual returns (uint256);
  13. function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual returns (uint256[] memory);
  14. function setApprovalForAll(address operator, bool approved) external virtual;
  15. function isApprovedForAll(address account, address operator) external view virtual returns (bool);
  16. function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external virtual;
  17. function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data) external virtual;
  18. }