ethers.js icon indicating copy to clipboard operation
ethers.js copied to clipboard

Support solc >= 0.8

Open bosswissam opened this issue 2 years ago • 1 comments

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

bosswissam avatar Aug 24 '22 19:08 bosswissam

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

bosswissam avatar Aug 24 '22 22:08 bosswissam

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! :)

ricmoo avatar Jan 18 '23 13:01 ricmoo