Buy Tokens
The getDepositAddress
function generates a smart account address that facilitates user operations. In this section, we’ll explore how to use this function to seamlessly bridge funds across chains.
Expected parameters
getDepositAddress
accepts the following parameters:
destinationChainId
string
Destination chain id
destinationTokenAddress
string
Address of the final token on the destination chain
toAmount
BigInt
Desired amount on destination chain
destinationRecipient
string
Target contract address on destination chain
transferType
"onramp" | "cex" | "wallet"
Specifies the type of the transfer
routeType
string
Default route is Value
. The type of route to be preferred. It can be Value
,Fee
and Time
provider (optional)
"moonpay" | "mesh-connect" | "kado"
Specifies the provider used for execution
fromChainId (optional)
number
Source chain id
fromTokenAddress (optional)
string
Address of initial token on source chain
fromAddress (optional)
string
Address of the sender on the source chain
fromAmount (optional)
BigInt
Amount of the initial token on the source chain
slippage (optional)
string
transferOut (optional)
any[]
targetCalldata(optional)
string
Encoded calldata for execution on the destination chain
gasLimit (optional)
string
Custom gas limit
userOpHash (optional)
string
userOperations (optional)
string
Function call
The getDepositAddress
function generates an address based on the provided payload, which must then be funded and submitted on-chain.
Using onramp
Response
The response from the getDepositAddress
is:
For more comprehensive implementation, refer cookbook example.
Support
If you face any trouble, feel free to reach out to our engineers in the Telegram support group.
Last updated