PrimaryLendingPlatformWrappedTokenGatewayZksync
Overview
License: MIT
The PrimaryLendingPlatformWrappedTokenGatewayZksync contract is the contract that provides the functionality for lending platform system using WETH for Zksync network.
Contract that provides the functionality for lending platform system using WETH. Inherit from PrimaryLendingPlatformWrappedTokenGatewayCore.
Functions info
withdraw (0x4143d0f6)
Allows users to withdraw their WETH tokens and receive Ether and update related token's prices.
Parameters:
projectTokenAmount
uint256
Amount of project tokens to withdraw.
priceIds
bytes32[]
An array of price identifiers used to update the price oracle.
updateData
bytes[]
An array of update data used to update the price oracle.
borrow (0xbeadd4d8)
Borrows lending tokens for the caller and converts them to Ether and update related token's prices.
Parameters:
projectToken
address
Address of the project token.
lendingTokenAmount
uint256
Amount of lending tokens to borrow.
priceIds
bytes32[]
An array of price identifiers used to update the price oracle.
updateData
bytes[]
An array of update data used to update the price oracle.
supply (0xbb27018d)
Allows users to supply ETH to the PrimaryLendingPlatformWrappedTokenGatewayCore contract. The ETH is converted to WETH and then transferred to the user's address. The supplyFromRelatedContract function of the PrimaryLendingPlatform contract is called to supply the WETH to the user.
Parameters:
supplyAmount
uint256
The amount of ETH to supply.
priceIds
bytes32[]
An array of price identifiers used to update the price oracle.
updateData
bytes[]
An array of update data used to update the price oracle.
updateFee
uint256
Update fee pays for updating price.
redeem (0x964ccc4d)
Redeems the specified amount of bLendingToken for the underlying asset (WETH) and transfers it to the caller.
Parameters:
bLendingTokenAmount
uint256
The amount of bLendingToken to redeem. If set to type(uint256).max
, redeems all the bLendingToken balance of the caller.
priceIds
bytes32[]
An array of price identifiers used to update the price oracle.
updateData
bytes[]
An array of update data used to update the price oracle.
redeemUnderlying (0x0c2e2ed6)
Redeems the underlying asset from the Primary Lending Platform and transfers it to the caller.
Parameters:
lendingTokenAmount
uint256
The amount of the lending token to redeem.
priceIds
bytes32[]
An array of price identifiers used to update the price oracle.
updateData
bytes[]
An array of update data used to update the price oracle.
liquidate (0xeca52d59)
Liquidates a position by providing project tokens in Ether and update related token's prices.
Parameters:
_account
address
Address of the account to be liquidated.
_prjInfo
struct Asset.Info
Information about the project token, including its address and type.
_lendingInfo
struct Asset.Info
Information about the lending token, including its address and type.
_lendingTokenAmount
uint256
Amount of lending tokens to liquidate.
priceIds
bytes32[]
An array of price identifiers used to update the price oracle.
updateData
bytes[]
An array of update data used to update the price oracle.
updateFee
uint256
Update fee pays for updating price.
buyCalldata
bytes[]
The calldata for buying the lending token from the exchange aggregator. If the calldata is empty, the liquidation will execute liquidation without hot borrowing.
leveragedBorrowWithProjectETH (0x291fd0dc)
Borrows lending tokens in a leveraged position using project tokens in Ether and update related token's prices.
Parameters:
_lendingInfo
struct Asset.Info
Information about the lending token, including its address and type.
_notionalExposure
uint256
The notional exposure of the leveraged position.
_marginCollateralAmount
uint256
Amount of collateral in margin.
buyCalldata
bytes[]
Calldata for buying project tokens.
leverageType
uint8
The type of leverage.
priceIds
bytes32[]
An array of price identifiers used to update the price oracle.
updateData
bytes[]
An array of update data used to update the price oracle.
updateFee
uint256
Update fee pays for updating price.
Last updated