I wanted to interact with 1 inch router using ethers.js. But, i am overwhelmed by the functions and interfaces exposed in the 1inch router, 1inch v4: Router | Address 0x1111111254fb6c44bac0bed2854e76f90643097d | Etherscan
(if it is the correct address).
Any help appreciated how to implement contract methods according to this tutorial in a local network.
Quick start | 1inch Network
1 Like
hey there,
The method you have in mind is unlikely possible , the only way is to use the API
1 Like
There is no testnet or local network for 1inch contract because we don’t have all liquidity sources on testnet.
Anyway, you can use ganache fork to emulate real mainnet calls
How to use:
-
Install ganache-cli
-
Run next command to setup a mainnet fork
ganache-cli --fork node-url -p 9545 --gasLimit 0xfffffffffff
Next you can connect to Web3 Provider on remix.ethereum.org with 9545 port (you can do that also via code)
And emulate execution for all data
1 Like