Comment on page
Send transaction
Send the transaction to the DEX Aggregator contract.
library.getSigner().sendTransaction({ from: account, to: contractAddress, data: data, gasPrice: userGasPrice?.value, // optional gasLimit: estimateGas, // optional value: nativeValue });
With data from /quote/single API (contractAddress, data, nativeValue, estimateGas)
account
: the address of the wallet sending the transactiondata
: the transaction data to be sentcontractAddress
: the address of the contract to which the transaction is being sentuserGasPrice
(optional): the gas price set by the userestimateGas
(optional): the estimated amount of gas needed for the transactioncurrencyInIsNative
: a boolean value that indicates whether the currency being used is native to the blockchain or notnativeValue
: the value of the native currency being sent with the transaction
This function returns a promise that resolves to a transaction hash. The format data can be found here: Signers
Last modified 5mo ago