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


pragma solidity 0.6.12;

interface ISomething { ... }


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.


Your Answer

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