IERC1155.sol 1.3 KB

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