Downpayment
This is the entrance contract for down payment
Methods
buy
Buy nft from the marketplace with downpayment
Parameters
Name | Type | Description |
---|---|---|
adapter | address | address of the marketplace adapter |
borrowAmount | uint256 | amount of borrowed from lending pool (max borrowable amount: lendPool.getNftCollateralData.availableBorrowsInReserve) |
data | bytes | |
sig | IDownpayment.Sig |
addAdapter
add new adapter
Parameters
Name | Type | Description |
---|---|---|
adapter | address | address of the marketplace adapter |
removeAdapter
remove adapter
Parameters
Name | Type | Description |
---|---|---|
adapter | address | address of the marketplace adapter |
renounceOwnership
Leaves the contract without owner. It will not be possible to call onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
transferOwnership
Transfers ownership of the contract to a new account (newOwner
). Can only be called by the current owner.
Parameters
Name | Type | Description |
---|---|---|
newOwner | address | address of the new owner |
View methods
WETH
Returns
Name | Type | Description |
---|---|---|
WETH | address | address of the WETH ("Wrapped Ether") contract |
getFee
Parameters
Name | Type | Description |
---|---|---|
adapter | address | address of the marketplace adapter |
Returns
Name | Type | Description |
---|---|---|
fee | uint256 | protocol fee (e.g., 200 = 2%) |
getFeeCollector
Returns
feeCollector | address | address of fee collector |
getBendLendPool
Returns
Name | Type | Description |
---|---|---|
bendLendPool | contract ILendPool | address of bend lend pool |
getAaveLendPool
Returns
Name | Type | Description |
---|---|---|
aaveLendPool | contract IAaveLendPool | address of aave lend pool |
nonces
Parameters
Name | Type | Description |
---|---|---|
owner | address | address of the owner |
Returns
Name | Type | Description |
---|---|---|
nonce | uint256 | next nonce of owner |
isAdapterWhitelisted
Returns if a adapter is in the system
Parameters
Name | Type | Description |
---|---|---|
adapter | address | address of the adapter |
Returns
Name | Type | Description |
---|---|---|
- | bool | whether adapter is whitelisted |
owner
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
owner | address | address of the current owner |
viewCountWhitelistedAdapters
View number of whitelisted adapters
Returns
Name | Type | Description |
---|---|---|
- | uint256 | number of adapters valid on the downpayment |
viewWhitelistedAdapters
See whitelisted adapters in the system
Parameters
Name | Type | Description |
---|---|---|
cursor | uint256 | cursor (should start at 0 for first request) |
size | uint256 | size of the response (e.g., 50) |
Returns
Name | Type | Description |
---|---|---|
- | address[] | array of adapter addresses |
cursor | uint256 | cursor position |
Last updated