LendingGetterAndSetterFacet
event LendingOperatorSet(address lender, address lendingOperator, uint32 tokenId, bool isLendingOperator)
function allowRevenueTokens(address[] tokens) external
function disallowRevenueTokens(address[] tokens) external
function setLendingOperator(address _lendingOperator, uint32 _tokenId, bool _isLendingOperator) public
Set the lending operator for a given token
Only the aavegotchi owner can set a lending operator Can only be called when the token is unlocked to prevent borrowers from setting operators
struct LendingOperatorInputs {
uint32 _tokenId;
bool _isLendingOperator;
}
function batchSetLendingOperator(address _lendingOperator, struct LendingGetterAndSetterFacet.LendingOperatorInputs[] _inputs) external
function revenueTokenAllowed(address token) external view returns (bool)
function getTokenBalancesInEscrow(uint32 _tokenId, address[] _revenueTokens) external view returns (uint256[] revenueBalances)
function isLendingOperator(address _lender, address _lendingOperator, uint32 _tokenId) external view returns (bool)
function getGotchiLendingListingInfo(uint32 _listingId) external view returns (struct GotchiLending listing_, struct AavegotchiInfo aavegotchiInfo_)
Get an aavegotchi lending details through an identifier
Will throw if the lending does not exist
Name | Type | Description |
---|---|---|
_listingId | uint32 | The identifier of the lending to query |
Name | Type | Description |
---|---|---|
listing_ | struct GotchiLending | A struct containing certain details about the lending like timeCreated etc |
aavegotchiInfo_ | struct AavegotchiInfo | A struct containing details about the aavegotchi |
function getLendingListingInfo(uint32 _listingId) external view returns (struct GotchiLending listing_)
Get an ERC721 lending details through an identifier
Will throw if the lending does not exist
Name | Type | Description |
---|---|---|
_listingId | uint32 | The identifier of the lending to query |
Name | Type | Description |
---|---|---|
listing_ | struct GotchiLending | A struct containing certain details about the ERC721 lending like timeCreated etc |
function getGotchiLendingFromToken(uint32 _erc721TokenId) external view returns (struct GotchiLending listing_)
Get an aavegotchi lending details through an NFT
Will throw if the lending does not exist
Name | Type | Description |
---|---|---|
_erc721TokenId | uint32 | The identifier of the NFT associated with the lending |
Name | Type | Description |
---|---|---|
listing_ | struct GotchiLending | A struct containing certain details about the lending associated with an NFT of contract identifier _erc721TokenId |
function getGotchiLendingIdByToken(uint32 _erc721TokenId) external view returns (uint32)
function getOwnerGotchiLendings(address _lender, bytes32 _status, uint256 _length) external view returns (struct GotchiLending[] listings_)
Query a certain amount of aavegotchi lending listings created by an address
Name | Type | Description |
---|---|---|
_lender | address | Creator of the listings to query |
_status | bytes32 | Status of the listings to query, "listed" or "agreed" |
_length | uint256 | How many aavegotchi listings to return |
Name | Type | Description |
---|---|---|
listings_ | struct GotchiLending[] | An array of lending |
function getOwnerGotchiLendingsLength(address _lender, bytes32 _status) external view returns (uint256)
Query a certain amount of aavegotchi lending listings created by an address
We don't care that this can loop forever since it's just an external view function
function getGotchiLendings(bytes32 _status, uint256 _length) external view returns (struct GotchiLending[] listings_)
Query a certain amount of aavegotchi lending listings
Name | Type | Description |
---|---|---|
_status | bytes32 | Status of the listings to query, "listed" or "agreed" |
_length | uint256 | How many listings to return |
Name | Type | Description |
---|---|---|
listings_ | struct GotchiLending[] | An array of lending |
function getLentTokenIdsOfLender(address _lender) external view returns (uint32[] tokenIds_)
function balanceOfLentGotchis(address _lender) external view returns (uint256 balance_)
function getGotchiLendingsLength() external view returns (uint256)
function isAavegotchiLent(uint32 _erc721TokenId) external view returns (bool)
function isAavegotchiListed(uint32 _erc721TokenId) external view returns (bool)
function getLendingPermissionBitmap(uint32 _listingId) external view returns (uint256)
function getAllLendingPermissions(uint32 _listingId) external view returns (uint8[32] permissions_)
function getLendingPermissionModifier(uint32 _listingId, uint8 _permissionIndex) public view returns (uint8)
function lendingPermissionSetToNone(uint32 _listingId) public view returns (bool)