Integrate YBridgeVault Contract
YBridgeVaultV3
State-Changing Functions
deposit
Initiate a deposit request.
The vaultTokenAmount
is the desired pool token to be deposited. After deposit, the liquidity provider will receive XYWrappedToken
(xyUSDT
, xyUSDC
or xyETH)
, along with another transaction sent by YBridge worker.
withdraw
Initiate a withdrawal request.
The shareAmount
is the desired amount of XYWrappedToken
to be redeemed to the underlying token.
Similar to deposit
, you will receive the underlying vault token along with another transaction sent by YBridge worker.
Public States
acceptDepositRequest
We can tell whether a YBridgeVault accepts deposit request or not from this state.
acceptWithdrawRequest
We can tell whether a YBridgeVault accepts withdraw request or not from this state.
isDepositCompleted
We can tell whether a deposit request is completed by giving the deposit request ID from this mapping.
isWithdrawCompleted
We can tell whether a withdrawal request is completed by giving the withdrawal request ID from this mapping.
Last updated