Skip to content

Instantly share code, notes, and snippets.

@kostasx
Forked from aunyks/erc721-definitions.sol
Created November 23, 2021 21:04
Show Gist options
  • Save kostasx/33def29494284e373b29743d8076b404 to your computer and use it in GitHub Desktop.
Save kostasx/33def29494284e373b29743d8076b404 to your computer and use it in GitHub Desktop.
contract ERC721 {
// ERC20 compatible functions
function name() constant returns (string name);
function symbol() constant returns (string symbol);
function totalSupply() constant returns (uint256 totalSupply);
function balanceOf(address _owner) constant returns (uint balance);
// Functions that define ownership
function ownerOf(uint256 _tokenId) constant returns (address owner);
function approve(address _to, uint256 _tokenId);
function takeOwnership(uint256 _tokenId);
function transfer(address _to, uint256 _tokenId);
function tokenOfOwnerByIndex(address _owner, uint256 _index) constant returns (uint tokenId);
// Token metadata
function tokenMetadata(uint256 _tokenId) constant returns (string infoUrl);
// Events
event Transfer(address indexed _from, address indexed _to, uint256 _tokenId);
event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment