UnstBONE
Last updated
Last updated
UnstBONE contract is an ERC721 contract used by the KnBONE contract to manage withdrawal requests.
address public knBONE;
- knBONE contract address.
uint256 public tokenIdIndex;
- totalSupply value of the contract. Burned NFTs are not taken into account, so it shows how many tokens were minted.
mapping(address => uint256[]) public owner2Tokens;
- for each address returns an array of tokens that this address owns.
mapping(uint256 => uint256) public token2Index;
- for each token returns the index in the owner2Tokens array.
mapping(address => uint256[]) public address2Approved;
- for each address returns an array of tokens that have been approved for this address. Does not take into account approvals via approvalForAll.
mapping(uint256 => uint256) public tokenId2ApprovedIndex;
- for each approved token returns the index in the returned array address2Approved.
isKnBONE()
- requires the function caller to be knBONE.
- initializer function, not called after initialization.
Mint new token.
Burns the token.
Rewritten 'approval' from ERC721, in addition to what it usually does, it also interacts with address2Approved and tokenId2ApprovedIndex.
Shows whether the spender is authorized to use the token (approved or owned). An approve that was made via approvalForAll is taken into account.
Sets knBONE contract address.
Duplicates owner2Tokens - for each address returns an array of tokens that this address owns.
Duplicates address2Approved - for each address returns an array of tokens that have been approved for this address. Does not take into account approvals via approvalForAll.
Switches pause on/off.