From 1d7289880f259998b600bf25a63f01b05ecdf9dc Mon Sep 17 00:00:00 2001 From: bo zhou Date: Tue, 28 Oct 2025 22:32:51 +0800 Subject: [PATCH] Fix/Add/Change: Specify the Solidity compiler version compatible with the contract compiler 0.4.24 --- truffle-config.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/truffle-config.js b/truffle-config.js index 0855df1..d8cb80a 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -15,4 +15,15 @@ module.exports = { // See // to customize your Truffle configuration! + compilers: { + solc: { + version: "0.4.24", // 指定与合约兼容的Solidity编译器版本 + settings: { // 可选配置 + optimizer: { + enabled: true, + runs: 200 + } + } + } + } };