PoolMarketplace
Main point of interaction with an ParaSpace protocol's market
Users can:
buyWithCredit
acceptBidWithCredit
batchBuyWithCredit
batchAcceptBidWithCredit
To be covered by a proxy contract, owned by the PoolAddressesProvider of the specific market All admin functions are callable by the PoolConfigurator contract defined also in the PoolAddressesProvider
ADDRESSES_PROVIDER
POOL_REVISION
constructor
Constructor.
Parameters
provider
contract IPoolAddressesProvider
The address of the PoolAddressesProvider contract
getRevision
Returns the revision number of the contract
Needs to be defined in the inherited class as a constant.
Return Values
[0]
uint256
The revision number
buyWithCredit
Implements the buyWithCredit feature. BuyWithCredit allows users to buy NFT from various NFT marketplaces including OpenSea, LooksRare, X2Y2 etc. Users can use NFT's credit and will need to pay at most (1 - LTV) * $NFT @dev
Parameters
marketplaceId
bytes32
The marketplace identifier
payload
bytes
The encoded parameters to be passed to marketplace contract (selector eliminated)
credit
struct DataTypes.Credit
The credit that user would like to use for this purchase
referralCode
uint16
The referral code used
batchBuyWithCredit
Implements the batchBuyWithCredit feature. BuyWithCredit allows users to buy NFT from various NFT marketplaces including OpenSea, LooksRare, X2Y2 etc. Users can use NFT's credit and will need to pay at most (1 - LTV) * $NFT
marketplaceIds[i] should match payload[i] and credits[i]
Parameters
marketplaceIds
bytes32[]
The marketplace identifiers
payloads
bytes[]
The encoded parameters to be passed to marketplace contract (selector eliminated)
credits
struct DataTypes.Credit[]
The credits that user would like to use for this purchase
referralCode
uint16
The referral code used
acceptBidWithCredit
Implements the acceptBidWithCredit feature. AcceptBidWithCredit allows users to accept a leveraged bid on ParaSpace NFT marketplace. Users can submit leveraged bid and pay at most (1 - LTV) * $NFT
The nft receiver just needs to do the downpayment
Parameters
marketplaceId
bytes32
The marketplace identifier
payload
bytes
The encoded parameters to be passed to marketplace contract (selector eliminated)
credit
struct DataTypes.Credit
The credit that user would like to use for this purchase
onBehalfOf
address
Address of the user who will sell the NFT
referralCode
uint16
The referral code used
batchAcceptBidWithCredit
Implements the batchAcceptBidWithCredit feature. AcceptBidWithCredit allows users to accept a leveraged bid on ParaSpace NFT marketplace. Users can submit leveraged bid and pay at most (1 - LTV) * $NFT
The nft receiver just needs to do the downpayment
Parameters
marketplaceIds
bytes32[]
The marketplace identifiers
payloads
bytes[]
The encoded parameters to be passed to marketplace contract (selector eliminated)
credits
struct DataTypes.Credit[]
The credits that the makers have approved to use for this purchase
onBehalfOf
address
Address of the user who will sell the NFTs
referralCode
uint16
The referral code used