How to check which compiler version the CLI uses?

Hi @asmeedhungana,

The issue is that you have contracts requiring different compiler versions and there is no compiler which can match all of these.

  • ^0.5.0
  • ^0.6.0
  • >=0.4.24
  • <0.7.0

The solc version being used is stored in .openzeppelin\project.json solcVersion.
We can also set the version using --solc-version, see: https://docs.openzeppelin.com/cli/2.8/compiling#picking_a_compiler_version


The guide: https://docs.openzeppelin.com/learn/sending-gasless-transactions uses Solidity 0.5, so we would need to install @openzeppelin/contracts-ethereum-package@2.5.0 to make it work or update the contracts being used, see the response to: Upgradeable GSN enabled Counter.sol has DeclarationError: Identifier not found or not unique

Please note, there are two versions of the GSN:

GSNv1 : Use in production now (though you may want to run your own relayer on mainnet to ensure availability).

We are no longer actively developing new features for this project, and the maintenance period has ended.

GSNv2 : In development at OpenGSN.org.

See Doubling down on security for more details.

Assuming you are just getting started and depending on your development roadmap, you could look at the upcoming improvements in GSNv2.

I suggest joining the OpenGSN telegram to get the latest news on GSNv2 development and timescales.

1 Like