Skip to content

Commit

Permalink
update readme with solc comment and a tiny cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
chandrakananandi committed Jul 12, 2023
1 parent d6e07c2 commit f48aad1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
10 changes: 6 additions & 4 deletions src/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ type CompilerRet = (i32, Vec<u8>, Vec<u8>);
/// 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";

Expand Down Expand Up @@ -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());
}

Expand Down

0 comments on commit f48aad1

Please sign in to comment.