ChainHop
Search
K

Contract: sendTransaction

Send transaction with parameters given by Quote request.
Use the successive code snippet to submit the on-chain transaction
const swapTx = await provider.send("eth_sendTransaction", [
{
from: USER_WALLET_ADDRESS,
to: CHAINHOP_CONTRACT_ADDRESS_ON_SOURCE_CHAIN,
data: SELECTED_PATH_FROM_QUOTE_RESPONSE.txData,
value: BigNumber
.from(SELECTED_PATH_FROM_QUOTE_RESPONSE.txValue)
.toHexString(),
},
]);