GotchiLendingFacet
struct AddGotchiListing {
uint32 tokenId;
uint96 initialCost;
uint32 period;
uint8[3] revenueSplit;
address originalOwner;
address thirdParty;
uint32 whitelistId;
address[] revenueTokens;
uint256 permissions;
}
function addGotchiListing(struct GotchiLendingFacet.AddGotchiListing p) public
Allow an aavegotchi lender (msg sender) or their lending operator to add request for lending
If the lending request exist, cancel it and replaces it with the new one If the lending is active, unable to cancel
function cancelGotchiLending(uint32 _listingId) public
Allow an aavegotchi lender or lending operator to cancel his NFT lending through the listingId
Name | Type | Description |
---|---|---|
_listingId | uint32 | The identifier of the lending to be cancelled |
function agreeGotchiLending(uint32 _listingId, uint32 _erc721TokenId, uint96 _initialCost, uint32 _period, uint8[3] _revenueSplit) external
Allow a borrower to agree an lending for the NFT
Will throw if the NFT has been lent or if the lending has been canceled already
Name | Type | Description |
---|---|---|
_listingId | uint32 | The identifier of the lending to agree |
_erc721TokenId | uint32 | |
_initialCost | uint96 | |
_period | uint32 | |
_revenueSplit | uint8[3] | |
function claimGotchiLending(uint32 _tokenId) public
Allow to claim revenue from the lending
Will throw if the NFT has not been lent or if the lending has been canceled already
Name | Type | Description |
---|---|---|
_tokenId | uint32 | The identifier of the lent aavegotchi to claim |
function claimAndEndGotchiLending(uint32 _tokenId) public
Allow a lender or borrower or lending operator to claim revenue from the lending and end the listing
Will throw if the NFT has not been lent or if the lending has been canceled already
Name | Type | Description |
---|---|---|
_tokenId | uint32 | The identifier of the lent aavegotchi to claim |
function extendGotchiLending(uint32 _tokenId, uint32 extension) public
Allows a lender or lending operator to extend a current listing
function addGotchiLending(uint32 _erc721TokenId, uint96 _initialCost, uint32 _period, uint8[3] _revenueSplit, address _originalOwner, address _thirdParty, uint32 _whitelistId, address[] _revenueTokens, uint256 _permissions) external
Exists to keep the same function signature as previous
function cancelGotchiLendingByToken(uint32 _erc721TokenId) public
Allow an aavegotchi lender to cancel his NFT lending by providing the NFT contract address and identifier
Name | Type | Description |
---|---|---|
_erc721TokenId | uint32 | The identifier of the NFT to be delisted from lending |
function claimAndEndAndRelistGotchiLending(uint32 _tokenId) public
Allows a lender or pet operator to end the listing and relist with the same parameters
function batchAddGotchiListing(struct GotchiLendingFacet.AddGotchiListing[] listings) external
Add gotchi listings in batch
function batchCancelGotchiLending(uint32[] _listingIds) external
Cancel gotchi listings in batch by listing ID
function batchCancelGotchiLendingByToken(uint32[] _erc721TokenIds) external
Cancel gotchi listings in batch by token ID
function batchClaimGotchiLending(uint32[] _tokenIds) external
Claim gotchi lendings in batch by token ID
function batchClaimAndEndGotchiLending(uint32[] _tokenIds) external
Claim and end gotchi lendings in batch by token ID
function batchClaimAndEndAndRelistGotchiLending(uint32[] _tokenIds) external
Claim and end and relist gotchi lendings in batch by token ID
struct BatchRenew {
uint32 tokenId;
uint32 extension;
}
function batchExtendGotchiLending(struct GotchiLendingFacet.BatchRenew[] _batchRenewParams) external
Extend gotchi listings in batch by token ID