Skip to content

Integrating Uniswap v3 oracle (solidity 0.7.6) with prb-math (solidity 0.8.x) #104

Closed Answered by PaulRBerg
partylikeits1983 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @partylikeits1983, thanks for posting this question.

The answer depends upon a few things.

First, if you are trying to import both the PRBMath contract and the Uniswap V3 contract in the same contract, that simply cannot work, because PRBMath works strictly with Solidity v0.8 and above, while Uniswap V3 works strictly with Solidity v0.7.6. In this case, the only solution would be to manually rewrite the Uniswap contract to use Solidity v0.8 (by carefully following the v0.8.0 breaking changes guide).

But, if that is not what you want to do, and you can keep the two contracts separate, then you may be able to compile both contracts. For example, with Hardhat you can enable multiple compi…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@partylikeits1983
Comment options

@PaulRBerg
Comment options

Answer selected by PaulRBerg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants