DCIPs/assets/eip-3267/contracts/ERC1155/IERC1155.sol

31 lines
1.3 KiB
Solidity
Raw Normal View History

// SPDX-License-Identifier: CC0-1.0
pragma solidity ^0.7.1;
import "@openzeppelin/contracts/introspection/IERC165.sol";
/**
@title ERC-1155 Multi Token Standard basic interface
@dev See https://eips.ethereum.org/EIPS/eip-1155
*/
abstract contract IERC1155 is IERC165 {
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values);
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
event URI(string value, uint256 indexed id);
function balanceOf(address owner, uint256 id) public view virtual returns (uint256);
function balanceOfBatch(address[] memory owners, uint256[] memory ids) public view virtual returns (uint256[] memory);
function setApprovalForAll(address operator, bool approved) external virtual;
function isApprovedForAll(address owner, address operator) external view virtual returns (bool);
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external virtual;
function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data) external virtual;
}