smartcontractkit / truffle-starter-kit

An example smart contract utilizing Chainlink
MIT License
266 stars 99 forks source link

Error: Truffle is currently using solc 0.6.6, but one or more of your contracts specify "pragma solidity ^0.8.0". #127

Closed rfields1128 closed 2 years ago

rfields1128 commented 2 years ago

When I run

npm test

I get this error

image

The error comes from some @openzepplin node modules that specify "pragma solidity ^0.8.0". I was wondering if I was doing something wrong or if the repo needs to be updated somehow.

rfields1128 commented 2 years ago

Duplicate of #122

facepalm just realized this is already an issue... Sorry!

cpascoli commented 2 years ago

Workaround to avoid compilation error and get tests to pass is to downgrade openzeppelin contracts to version 3.3.0 in package.json:

"@openzeppelin/contracts": "3.3.0",