I need to create my own token router form integrating with anyswap router https://anyswap.exchange/bridge#/router
I am creating an instance of a contract based on it's ABI and then I am calling this method of the instance anySwapOutUnderlying
const myContract = web3.eth.Contract(routerAbi, '0xf390830df829cf22c53c8840554b98eafc5dcbc2')
const contractData = myContract.methods.anySwapOutUnderlying(
'0x55d398326f99059fF775485246999027B3197955',
'0x382bb369d343125bfb2117af9c149795c6c65c50',
1,
137,
).encodeABI()
then I am preparing the request data:
const requestData = {
chainId: web3.utils.toHex(56),
from: 'my cool address',
gas: '',
gasPrice: '',
nonce: '',
to: '0x382bb369d343125bfb2117af9c149795c6c65c50',
value: '0x0',
data: contractData,
}
afterwards I am creating a batch where I add a couple of steps, but nothing happens at the end once I execute it