@across-protocol/app-sdk / simulateUpdateDepositTx
simulateUpdateDepositTx(
params
):Promise
<SimulateContractReturnType
>
This function simulates the update of a deposit on the origin chain. Can be used to update:
- the recipient address
- the output amount, i.e. the fees
- the cross-chain message Note that this requires a signature from the depositor.
• params: SimulateUpdateDepositTxParams
See SimulateUpdateDepositTxParams.
Promise
<SimulateContractReturnType
>
The result of the simulation.
const result = await simulateUpdateDepositTx({
walletClient,
. originChainClient,
destinationChainClient,
deposit: {
// deposit details
},
update: {
recipient: "0xNEW_RECIPIENT_ADDRESS",
},
});
const txHash = await walletClient.writeContract({
account,
...txRequest,
});