Error: Truffle is currently using solc 0.8.13, but one or more of your contracts specify "pragma solidity ^0.8.20".

 

运行 truffle compile 报错

Error: Truffle is currently using solc 0.8.13, but one or more of your contracts specify "pragma solidity ^0.8.20".

修改

truffle-config.js 的 solc 版本为 0.8.20 再运行即可

 

posted @ 2024-10-04 16:25  apeNote  阅读(4)  评论(0编辑  收藏  举报