1

I got error importing and using 1INCH. The problem is in the versions. In IOneSplit.sol version is 0.5.0 (pragma solidity ^0.5.0). And IOneSplit imports IERC20 which is in 0.8.0 (pragma solidity ^0.8.0). I'm using RemixIDE. Is the error from my side? How can I fix it?

IERC20: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol

IOneSplit: https://github.com/1inch/1inchProtocol/blob/master/contracts/IOneSplit.sol


Any help appreciated.

1 Answer 1

1

It is possible to use OpenZeppelin contracts' version 2.5, it was the latest to support solc 0.5.x: IERC20.sol.

2
  • Thank you @Ismael. Are you sure I won't get errors from SafeMath etc.? Commented May 10, 2021 at 16:00
  • @RafayelKh You have two options either downgrade OpenZeppelin to v2.5 use solc v0.5 or migrate to IOneSplit to use solc v0.8. Commented May 10, 2021 at 16:32

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.