diff --git a/README.md b/README.md index c97e9dd..e19070e 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,9 @@ sure it is visible on your `PATH`. Alternatively, you can specify where Gambit c find the Solidity compiler with the option `--solc path/to/solc`, or specify a version of solc (e.g., solc8.12) with the option `--solc solc8.12`. +_NOTE_ All tests (`cargo test`) are currently run using solc8.13. Your tests may fail if your `solc` points at + a different version of the compiler._ + ### Running `gambit mutate` The `gambit mutate` command expects either a `--filename` argument or a `--json` diff --git a/src/compile.rs b/src/compile.rs index c636993..88ebb2c 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -14,7 +14,9 @@ type CompilerRet = (i32, Vec, Vec); /// compilation constants static INPUT_JSON: &str = "input_json"; -static ALLOWPATH: &str = "--allow-paths"; +static ALLOWPATHS: &str = "--allow-paths"; +static INCLUDEPATH: &str = "--include-path"; +static BASEPATH: &str = "--base-path"; static OPTIMIZE: &str = "--optimize"; static DOT_JSON: &str = ".json"; @@ -291,19 +293,19 @@ impl Solc { } if let Some(basepath) = &self.basepath { - flags.push("--base-path".into()); + flags.push(BASEPATH.into()); flags.push(basepath.clone()); } if let Some(allow_paths) = &self.allow_paths { - flags.push(ALLOWPATH.into()); + flags.push(ALLOWPATHS.into()); for r in allow_paths { flags.push(r.clone()); } } if let Some(include_path) = &self.include_path { - flags.push("--include-path".into()); + flags.push(INCLUDEPATH.into()); flags.push(include_path.clone()); }