ethers.js
ethers.js copied to clipboard
Support solc >= 0.8
Ethers Version
5.7.0
Search Terms
ethers-ts
Describe the Problem
ethers-ts seems to be always using [email protected]. This presents a problem when it is used on .sol files that include pragma solidity ^0.8.13
since ether-ts is requiring a different version of solc than the file it's being used on.
In the example below, Interface.sol
only needs to include
pragma solidity ^0.8.13;
Code Snippet
ethers-ts Interface.sol
Contract ABI
No response
Errors
'Interface.sol:3:1: ParserError: Source file requires different compiler version (current compiler is 0.7.1+commit.f4a555be.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version\n' +
'pragma solidity ^0.8.13;\n' +
'^----------------------^\n'
Environment
No response
Environment (Other)
No response
Already filed it as a bug but now seeing that the cli code is not supporting solc >= 0.8 I see why the bug occurs, so might be better to change this to a feature request
In v6, for now I'm sunsetting the cli tools as part of core, but may revisit them in the future.
For now, tools like Hardhat, TypeChain, etc. fill this hole nicely now. :)
Closing now, but thanks! :)