Interacting with the Exchange
Import the interface, exchange. That's it!
IExchange.sol
Import the interface above, then assuming that you have given ERC20 approval to the exchange,
If you'd like to send ERC20 and receive ERC20:
ERC20 -> ERC20
If you'd like to send native ETH and receive ERC20:
Native ETH -> ERC20
If you'd like to send ERC20 and receive native ETH:
ERC20 -> Native ETH
If you find that it is reverting, please check the two causes below: 1. Not enough ERC20 approval to transfer tokens
2. No route preconfigured in the exchange
Last updated