Methods
The public methods of the Infinity NFT contract
The XfaiINFT
contract inherits from five contracts: ERC721Enumerable
, ERC721
, ERC721Metadata
, and ERC165
. The methods of which are the following:
XfaiINFT methods
reserve
: Returns the reserve of XFIT tokens locked within the INFT contract.
totalSharesIssued
: Returns the total amount of issued shares.
initialReserve
: Returns the initial reserve set during deployment. Does count as part of INFT reserve.
harvestedBalance
: Mapping from token address to harvested amounts. harvestedBalance shows how much of a token has been harvested so far from the contract.
INFTShares
: Mapping from token ID to share.
sharesHarvestedByPool
: Mapping from token address to token ID to token share.
totalSharesHarvestedByPool
: Mapping from token address to total share for a token.
setBaseURI
: Sets the baseURI of the NFT. Can only be called by the contract owner.
getStates
: Returns the contract's initialReserve
, reserve
, and totalSharesIssued.
shareToTokenAmount
: Returns the amount of _token
fees collected for a given _tokenID,
as well the share of an INFT and the amount of shares harvested for a given pool.
mint
: Creates a new INFT, the share of which is determined by the amount of XFIT locked in the Factory.
boost
: Boosts a new INFT, the share of which is determined by the amount of XFIT locked in the Factory.
harvestToken
: Harvests the fees (in terms of a given ERC20 token) for a given INFT.
harvestETH
: Harvests the ETH fees for a given INFT.
ERC721Enumerable methods
totalSupply
: Returns the total amount of tokens stored by the contract.
tokenOfOwnerByIndex
: Returns a token ID owned by owner
at a given index
of its token list.
tokenByIndex
: Returns a token ID at a given index
of all the tokens stored by the contract.
ERC721 methods
balanceOf
: Returns the number of tokens in owner
's account.
ownerOf
: Returns the owner of the tokenId
token.
safeTransferFrom
: Safely transfers tokenId
token from from
to to
.
transferFrom
: Transfers tokenId
token from from
to to
.
approve
: Gives permission to to
to transfer tokenId
token to another account.
setApprovalForAll
: Approve or remove operator
as an operator for the caller.
getApproved
: Returns the account approved for tokenId
token.
isApprovedForAll
: Returns if the operator
is allowed to manage all of the assets of owner
.
ERC721Metadata methods
name
: Returns the token collection name.
symbol
: Returns the token collection symbol.
tokenURI
: Returns the Uniform Resource Identifier (URI) for tokenId
token.
ERC165 methods
supportsInterface
: Returns true if this contract implements the interface defined by interfaceId
.
Last updated