Downpayment

This is the entrance contract for down payment

Methods

buy

function buy(address adapter,uint256 borrowAmount,bytes calldata data,Sig calldata sig) external payable;

Buy nft from the marketplace with downpayment

Parameters

Name
Type
Description

adapter

address

address of the marketplace adapter

borrowAmount

uint256

data

bytes

sig

IDownpayment.Sig

addAdapter

function addAdapter(address adapter) external nonpayable

add new adapter

Parameters

Name
Type
Description

adapter

address

address of the marketplace adapter

removeAdapter

function removeAdapter(address adapter) external nonpayable

remove adapter

Parameters

Name
Type
Description

adapter

address

address of the marketplace adapter

renounceOwnership

function renounceOwnership() external nonpayable

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

function transferOwnership(address newOwner) external nonpayable

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

function WETH() external view returns (address)

Returns

Name
Type
Description

WETH

address

address of the WETH ("Wrapped Ether") contract

getFee

function getFee(address adapter) external view returns (uint256)

Parameters

Name
Type
Description

adapter

address

address of the marketplace adapter

Returns

Name
Type
Description

fee

uint256

protocol fee (e.g., 200 = 2%)

getFeeCollector

function getFeeCollector() external view returns (address)

Returns

feeCollector

address

address of fee collector

getBendLendPool

function getBendLendPool() external view returns (ILendPool)

Returns

Name
Type
Description

bendLendPool

contract ILendPool

address of bend lend pool

getAaveLendPool

function getAaveLendPool() external view returns (IAaveLendPool)

Returns

Name
Type
Description

aaveLendPool

contract IAaveLendPool

address of aave lend pool

nonces

function nonces(address owner) external view returns (uint256)

Parameters

Name
Type
Description

owner

address

address of the owner

Returns

Name
Type
Description

nonce

uint256

next nonce of owner

isAdapterWhitelisted

function isAdapterWhitelisted(address adapter) external view returns (bool)

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

function owner() external view returns (address)

Returns the address of the current owner.

Returns

Name
Type
Description

owner

address

address of the current owner

viewCountWhitelistedAdapters

function viewCountWhitelistedAdapters() external view returns (uint256)

View number of whitelisted adapters

Returns

Name
Type
Description

-

uint256

number of adapters valid on the downpayment

viewWhitelistedAdapters

function viewWhitelistedAdapters(uint256 cursor, uint256 size) external view returns (address[], uint256)

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