0

Working through the examples of uniswap v2 (https://uniswap.org/docs/v2/smart-contract-integration/quick-start/) I got stuck with the following problem: Versions required are different

As we can see, v2-core requires solidity 5 while v2-peryphery requires solidity 6.

The issue is opened on the github: https://github.com/Uniswap/uniswap-v2-core/issues/105 from 2020.

Does anyone have a solution to that? How should i import both core and periphery contracts into my contract to make their examples work?

1 Answer 1

1

That's one of the... interesting aspects of Uniswap V2. Uniswap really isn't very friendly to cloning.

You have a few options:

  1. Use something like Hardhat, which supports multiple Solidity versions in the same project. Also, unless I totally misremember, the newest Truffle also supports multiple versions - or maybe it was just a near future plan, can't really remember.

  2. Run them in separate projects

  3. Update the core files manually to 0.6.x. Not a fun thing to do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.