WPunkGateway

Punk

contract IPunks Punk

WPunk

contract IWrappedPunks WPunk

Pool

contract IPool Pool

proxy

address proxy

punk

address punk

wpunk

address wpunk

pool

address pool

constructor

constructor(address _punk, address _wpunk, address _pool) public

Sets the WETH address and the PoolAddressesProvider address. Infinite approves pool.

Parameters

initialize

function initialize() external

supplyPunk

function supplyPunk(struct DataTypes.ERC721SupplyParams[] punkIndexes, address onBehalfOf, uint16 referralCode) external

supplies (deposits) WPunk into the reserve, using native Punk. A corresponding amount of the overlying asset (xTokens) is minted.

Parameters

withdrawPunk

function withdrawPunk(uint256[] punkIndexes, address to) external

_withdraws the WPUNK reserves of msg.sender.

Parameters

acceptBidWithCredit

function acceptBidWithCredit(bytes32 marketplaceId, bytes payload, struct DataTypes.Credit credit, uint256[] punkIndexes, uint16 referralCode) external

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

batchAcceptBidWithCredit

function batchAcceptBidWithCredit(bytes32[] marketplaceIds, bytes[] payloads, struct DataTypes.Credit[] credits, uint256[] punkIndexes, uint16 referralCode) external

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

emergencyERC721TokenTransfer

function emergencyERC721TokenTransfer(address token, uint256 tokenId, address to) external

transfer ERC721 from the utility contract, for ERC721 recovery in case of stuck tokens due direct transfers to the contract address.

Parameters

emergencyPunkTransfer

function emergencyPunkTransfer(address to, uint256 punkIndex) external

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

getWPunkAddress

function getWPunkAddress() external view returns (address)

Get WPunk address used by WPunkGateway

onERC721Received

function onERC721Received(address, address, uint256, bytes) public virtual returns (bytes4)