Send transaction

Send the transaction to the DEX Aggregator contract.

Example

library.getSigner().sendTransaction({ from: account, to: contractAddress, data: data, gasPrice: userGasPrice?.value, // optional gasLimit: estimateGas, // optional value: nativeValue });

Parameters

With data from /quote/single API (contractAddress, data, nativeValue, estimateGas)

  • account: the address of the wallet sending the transaction

  • data: the transaction data to be sent

  • contractAddress: the address of the contract to which the transaction is being sent

  • userGasPrice (optional): the gas price set by the user

  • estimateGas (optional): the estimated amount of gas needed for the transaction

  • currencyInIsNative: a boolean value that indicates whether the currency being used is native to the blockchain or not

  • nativeValue: the value of the native currency being sent with the transaction

Return Value

This function returns a promise that resolves to a transaction hash. The format data can be found here: Signers

Last updated