1

I'm extending a large codebase with another contract and I need to import an interface. My new contract uses 0.8.9 but the rest of the codebase is in 0.6.12. I'm using Hardhat multi compile to do this

Interface

pragma solidity 0.6.12;

interface ISomething { ... }

Implementation

pragma solidity 0.6.12;

contract Something is ISomething { ... }

New Addition

pragma solidity 0.8.9;

contract NewThing {
  ISomething public something;
}

I can't get this to compile with the interface file shared between them. I could copy it in 0.8.9, but that seems like bad practice.

0

Your Answer

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