WPunkGateway
Punk
WPunk
Pool
proxy
punk
wpunk
pool
constructor
Sets the WETH address and the PoolAddressesProvider address. Infinite approves pool.
Parameters
Name | Type | Description |
---|---|---|
_punk | address | Address of the Punk contract |
_wpunk | address | Address of the Wrapped Punk contract |
_pool | address | Address of the proxy pool of this contract |
initialize
supplyPunk
supplies (deposits) WPunk into the reserve, using native Punk. A corresponding amount of the overlying asset (xTokens) is minted.
Parameters
Name | Type | Description |
---|---|---|
punkIndexes | struct DataTypes.ERC721SupplyParams[] | punkIndexes to supply to gateway |
onBehalfOf | address | address of the user who will receive the xTokens representing the supply |
referralCode | uint16 | integrators are assigned a referral code and can potentially receive rewards. |
withdrawPunk
_withdraws the WPUNK reserves of msg.sender.
Parameters
Name | Type | Description |
---|---|---|
punkIndexes | uint256[] | indexes of nWPunks to withdraw and receive native WPunk |
to | address | address of the user who will receive native Punks |
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
Name | Type | Description |
---|---|---|
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 |
punkIndexes | uint256[] | |
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
Name | Type | Description |
---|---|---|
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 |
punkIndexes | uint256[] | |
referralCode | uint16 | The referral code used |
emergencyERC721TokenTransfer
transfer ERC721 from the utility contract, for ERC721 recovery in case of stuck tokens due direct transfers to the contract address.
Parameters
Name | Type | Description |
---|---|---|
token | address | ERC721 token to transfer |
tokenId | uint256 | tokenId to send |
to | address | recipient of the transfer |
emergencyPunkTransfer
transfer native Punk from the utility contract, for native Punk recovery in case of stuck Punk due selfdestructs or transfer punk to pre-computated contract address before deployment.
Parameters
Name | Type | Description |
---|---|---|
to | address | recipient of the transfer |
punkIndex | uint256 | punk to send |
getWPunkAddress
Get WPunk address used by WPunkGateway