PrimaryLendingPlatformWrappedTokenGatewayZksync

Overview

License: MIT

contract PrimaryLendingPlatformWrappedTokenGatewayZksync is PrimaryLendingPlatformWrappedTokenGatewayCore

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)

function withdraw(
    uint256 projectTokenAmount,
    bytes32[] memory priceIds,
    bytes[] calldata updateData
) public payable nonReentrant

Allows users to withdraw their WETH tokens and receive Ether and update related token's prices.

Parameters:

borrow (0xbeadd4d8)

function borrow(
    address projectToken,
    uint256 lendingTokenAmount,
    bytes32[] memory priceIds,
    bytes[] calldata updateData
) public payable nonReentrant

Borrows lending tokens for the caller and converts them to Ether and update related token's prices.

Parameters:

supply (0xbb27018d)

function supply(
    uint256 supplyAmount,
    bytes32[] memory priceIds,
    bytes[] calldata updateData,
    uint256 updateFee
) external payable nonReentrant

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:

redeem (0x964ccc4d)

function redeem(
    uint256 bLendingTokenAmount,
    bytes32[] memory priceIds,
    bytes[] calldata updateData
) external payable nonReentrant

Redeems the specified amount of bLendingToken for the underlying asset (WETH) and transfers it to the caller.

Parameters:

redeemUnderlying (0x0c2e2ed6)

function redeemUnderlying(
    uint256 lendingTokenAmount,
    bytes32[] memory priceIds,
    bytes[] calldata updateData
) external payable nonReentrant

Redeems the underlying asset from the Primary Lending Platform and transfers it to the caller.

Parameters:

liquidate (0xeca52d59)

function liquidate(
    address _account,
    Asset.Info memory _prjInfo,
    Asset.Info memory _lendingInfo,
    uint256 _lendingTokenAmount,
    bytes32[] memory priceIds,
    bytes[] calldata updateData,
    uint256 updateFee,
    bytes[] memory buyCalldata
)
    public
    payable
    nonReentrant
    returns (address[] memory assets, uint256[] memory assetAmounts)

Liquidates a position by providing project tokens in Ether and update related token's prices.

Parameters:

leveragedBorrowWithProjectETH (0x291fd0dc)

function leveragedBorrowWithProjectETH(
    Asset.Info memory _lendingInfo,
    uint256 _notionalExposure,
    uint256 _marginCollateralAmount,
    bytes[] memory buyCalldata,
    uint8 leverageType,
    bytes32[] memory priceIds,
    bytes[] calldata updateData,
    uint256 updateFee
) public payable nonReentrant

Borrows lending tokens in a leveraged position using project tokens in Ether and update related token's prices.

Parameters:

Last updated