Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Contract: srcDeposit

Requirements

  1. Get the quote result from rfqQuote API
  2. 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.

// typechain method example
  srcDeposit(
    _quote: RFQ.QuoteStruct,
    _submissionDeadline: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

Request Parameters

NameTypeDescription
_quoteRFQ.QuoteStructrefer to RFQ.QuoteStruct
_submissionDeadlineNumberget form rfqQuote srcDeadline filed
value(msg.value)StringERC20 bridge: msgFee, Native token bridge: msgFee + source token amount

RFQ.QuoteStruct

NameTypeDescription
srcChainIdNumbersource chain id
srcTokenStringsource token address
srcAmountStringInput amount with source token decimal
srcReleaseAmountNOT REQUIRED
dstChainIdNumberdestination chain id
dstTokenStringDestination token address
dstAmountStringget from rfqQuote dstAmount filed
deadlineNumber(Second)get from rfqQuote dstDeadline filed
nonceNumberget from rfqQuote nonce filed
senderStringrfq contract sender address
receiverStringreceive address
refundToStringrefund address, Usually the user wallet address.
liquidityProviderStringmarket 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.