Page cover

📃Smart contract Interaction

Interaction method used by the Smart contract and its address.

Smart contract Address

0xb657fa9443a2db2990D45e93EbD8152C2B2BeB12
Deployed address on basescan

Method of interaction

        const iface = new ethers.Interface([
            "function executeTrades(address token, uint256 iterations, uint256 minAmountOut, address[] buyPath, address[] sellPath)"
        ]);
        const data = iface.encodeFunctionData("executeTrades", [tokenAddress, iterations, minAmountOut, buyPath, sellPath]);

        // Send the transaction
        const tx = await wallet.sendTransaction({
            to: contractAddress,
            data: data,
            value: ethers.parseEther('0.00001') // Example amount of ETH to send
        });

Last updated