From 735573c08cafbdf4cd0d8c513a3c5a4d9a822f88 Mon Sep 17 00:00:00 2001 From: carlosescom Date: Sun, 2 Feb 2020 01:15:08 -0600 Subject: [PATCH] ParserError: Source file requires different compiler version --- truffle-config.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/truffle-config.js b/truffle-config.js index 3bd333e..031d459 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -30,5 +30,20 @@ module.exports = { }, network_id: 3 }, + }, + compilers: { + solc: { + version: "^0.5.0", // A version or constraint - Ex. "^0.5.0" + // Can also be set to "native" to use a native solc + docker: false, // Use a version obtained through docker + parser: "solcjs", // Leverages solc-js purely for speedy parsing + settings: { + optimizer: { + enabled: true, + runs: 1000, // Optimize for how many times you intend to run the code + }, + evmVersion: "petersburg" // Default: "petersburg" + } + } } };