Comment on page
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.
function deposit(address pool, uint256[] calldata punkIndexes, address to)
Allows users to deposit CryptoPunks into pool as collateral asset in contract.
Name | Type | Description |
---|---|---|
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. |
function withdraw(address pool, uint256[] calldata punkIndexes, address to)
Allows users to withdraw CryptoPunks from pool.
Name | Type | Description |
---|---|---|
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. |
function liquidateWithEth(
address pool,
uint256 punkIndex,
address user
)
Liquidates a un-health CryptoPunks loan with native ETH.
Name | Type | Description |
---|---|---|
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. |
function liquidateWithWeth(
address pool,
uint256 punkIndex,
address user
)
Liquidates a un-health punk loan with ERC20 reserve.
Name | Type | Description |
---|---|---|
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 modified 6mo ago