Send Fees
Fees cover our portion of the smart contract interactions
Find the Current Fees
Example
const apiResponse = await fetch(`${SWAP_API_URL}/gas-estimate?sourceChain=VECHAIN&targetChain=ETHEREUM`, {
headers: {
'Content-Type': 'application/json',
'X-API-KEY': 'MY_API_KEY'
}
});
const fees = await apiResponse.json();
const originalChainFee = fees.sourceChain;
const destinationChainFee = fees.targetChain;
const originalTx = await signerOnOriginalChain.sendTransaction({to: SAFESWAP_FEE_ADDRESS_VECHAIN, value: originalChainFee})
const destinationTx = await signerOnDestinationChain.sendTransaction({to: SAFESWAP_FEE_ADDRESS_ETHEREUM, value: destinationChainFee})
const originalFeeTxId = originalTx.hash;
const destinationFeeTxId = destinationTx.hash;Last updated