How to use OpenZepppelin Contracts with Solidity 0.6?

How to use openZeppelin contract when my SCs have this version : 0.6.12

Error: Truffle is currently using solc 0.6.12, but one or more of your contracts specify “pragma solidity ^0.8.0”.

1 Like

Hi @CrashBanditCoin14,

Welcome to the community :wave:

You can either change your contracts to use Solidity 0.8 or install an older version of OpenZeppelin Contracts. Contracts 3.x supports Solidity 0.6 and Solidity 0.7

npm install @openzeppelin/contracts@3.4.1

thank you very much ! It works perfectly !

1 Like