assetAddressOf(uint256) :
undefined
- positionId: id of the position
balanceOf(address) :
undefined
- addr: address
depositERC721(address,address,uint256) :
reverts with InvalidAssetType if `assetAddress` is not an ERC721
- assetAddress: address of the ERC20 address
- assetTokenId: id of the ERC721 asset to add
- owner: address that owns the position
erc721IdOf(uint256) :
reverts with InvalidAssetType if `assetAddress` is not an ERC721
- positionId: id of the position
harvest(uint256) :
undefined
- positionId: id of the position
onERC721Received(address,address,uint256,bytes) :
Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} by `operator` from `from`, this function is called. It must return its Solidity selector to confirm the token transfer. If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
ownerOf(uint256) :
undefined
- positionId: id of the position
tokenByIndex(uint256) :
Returns a position ID at a given `index` of all the positions stored by the contract.use with {totalSupply} to enumerate all positions
- index: index to get the position ID at
tokenOfOwnerByIndex(address,uint256) :
use with {balanceOf} to enumerate all of `owner`'s positions
- index: index of the owner's balance to get the position ID of
- owner: owner of the positions
totalsOf(address) :
this is used by Membership to determine how much is eligible in the current epoch vs the next epoch.
- owner: address owning the positions
withdraw(uint256) :
undefined
- positionId: id of the position
depositERC721(address,address,uint256) :
This function deposits an ERC721 asset, mints a position, and transfers ownership to the contract.
(autogenerated documentation)
erc721IdOf(uint256) :
This function returns the asset token ID associated with a given position ID in an ERC721 contract.
(autogenerated documentation)
withdraw(uint256) :
This function withdraws an ERC721 asset from a position, transfers it to the owner, and deletes the position.
(autogenerated documentation)
harvest(uint256) :
This function harvests ERC721 tokens from a position, using the CapitalAssets library, and emits an event.
(autogenerated documentation)
assetAddressOf(uint256) :
This function returns the asset address of a given position ID by accessing the positions mapping.
(autogenerated documentation)
ownerOf(uint256) :
This function returns the owner of a specific position identified by its ID. It retrieves the owner address from a mapping called "positions".
(autogenerated documentation)
totalsOf(address) :
This function returns the eligible and total amounts for a given address by calling a method on a mapping.
(autogenerated documentation)
totalSupply() :
This function returns the total supply of a token by returning the value of a counter.
(autogenerated documentation)
balanceOf(address) :
This function returns the number of tokens owned by a given address by checking the length of the array of owners.
(autogenerated documentation)
tokenOfOwnerByIndex(address,uint256) :
This function returns the token ID at a specific index in the array of tokens owned by a given address.
(autogenerated documentation)
tokenByIndex(uint256) :
This function returns the token ID at a given index, adding 1 to the index since token IDs start at 1.
(autogenerated documentation)
onERC721Received(uint256,) :
This function returns the selector of the onERC721Received function from the IERC721ReceiverUpgradeable interface, indicating that the contract can receive ERC721 tokens.
(autogenerated documentation)
_mintPosition(address,address,uint256) :
This function mints a new position for an owner with an asset address and USDC equivalent value, and adds it to their list of positions.
(autogenerated documentation)
_kick(uint256) :
This internal function kicks a user out of a position by updating their USDC equivalent value and emitting an event.
(autogenerated documentation)