Contract: srcDeposit
Peti bridge contract interaction reference
Requirements
Get the quote result from rfqQuote API
Find the corresponding contract address here
ABI (optional if you use the binding like Typechain)
srcDeposit/srcDepositNative
Lock the assets to source rfq contract. if the bridge token is a native token, use the srcDepositNative.
Request Parameters
Name | Type | Description |
---|---|---|
_quote | RFQ.QuoteStruct | refer to RFQ.QuoteStruct |
_submissionDeadline | Number | get form rfqQuote srcDeadline filed |
value(msg.value) | String | ERC20 bridge: msgFee, Native token bridge: msgFee + source token amount |
RFQ.QuoteStruct
Name | Type | Description |
---|---|---|
srcChainId | Number | source chain id |
srcToken | String | source token address |
srcAmount | String | Input amount with source token decimal |
srcReleaseAmount | NOT REQUIRED | |
dstChainId | Number | destination chain id |
dstToken | String | Destination token address |
dstAmount | String | get from rfqQuote dstAmount filed |
deadline | Number(Second) | get from rfqQuote dstDeadline filed |
nonce | Number | get from rfqQuote nonce filed |
sender | String | rfq contract sender address |
receiver | String | receive address |
refundTo | String | refund address, Usually the user wallet address. |
liquidityProvider | String | market maker address, get form rfqQuote mmAddr filed |
Once the transaction submitting, same as other EVM bridge, user history can be found in TransferHistory API, and the transaction process status can be found in GetTransferStatus API.
Last updated