estimateArb

view

Use this function in your app

const response = await fetch('https://api.thirdweb.com/v1/contracts/read', { method: 'POST', headers: { 'Content-Type': 'application/json', 'x-secret-key': '<YOUR_SECRET_KEY>' }, body: JSON.stringify({ calls: [ { contractAddress: "0xECD22bAa69cE97867659C2d57F6D946224FFbA60", method: "function estimateArb(uint256 _amount, address _router1, address _router2, address token0, address token1) view returns (uint256 starting, uint256 ending)", params: [_amount, _router1, _router2, token0, token1] } ], chainId: 43114 }) }); const data = await response.json();