PunkGateway

useIf you need to use CryptoPunks in the protocol, it must first be wrapped into WPUNKS. The WPUNKS Gateway contract is a helper contract to easily wrap and unwrap CryptoPunks as necessary when interacting with the protocol, since only ERC721 is used within protocol interactions.

Methods

deposit

function deposit(address pool, uint256[] calldata punkIndexes, address to)

Allows users to deposit CryptoPunks into pool as collateral asset in contract.

call params

NameTypeDescription

pool

address

The address of lending pool contract.

punkIndexes

uint256[]

The indexs of the CryptoPunks used as collateral

to

address

The address of the user who will deposite the CryptoPunks and receive TNFT.

withdraw

function withdraw(address pool, uint256[] calldata punkIndexes, address to)

Allows users to withdraw CryptoPunks from pool.

call params

NameTypeDescription

pool

address

The address of lending pool contract.

punkIndex

uint256[]

The indexs of the CryptoPunks used as collateral

to

address

The address of the user who will receive CryptoPunks.

liquidateWithEth

function liquidateWithEth(
    address pool,
    uint256 punkIndex,
    address user
 )

Liquidates a un-health CryptoPunks loan with native ETH.

call params

NameTypeDescription

pool

address

The address of lending pool contract.

punkIndex

uint256

The index of the CryptoPunks used as collateral

user

address

The address of the user who will receive CryptoPunks or TNFT.

liquidateWithWeth

function liquidateWithWeth(
    address pool, 
    uint256 punkIndex, 
    address user
)

Liquidates a un-health punk loan with ERC20 reserve.

call params

NameTypeDescription

pool

address

The address of lending pool contract.

punkIndex

uint256

The index of the CryptoPunks used as collateral

user

address

The address of the user who will receive CryptoPunks or TNFT.

Last updated