From 135bca4680ebf247e5f2efa518ac8dfbc6866bc8 Mon Sep 17 00:00:00 2001 From: Roman Krasiuk Date: Fri, 13 May 2022 22:59:47 +0300 Subject: [PATCH] update & lock solang (#1256) --- Cargo.lock | 31 +++---------------------------- ethers-solc/Cargo.toml | 2 +- ethers-solc/src/resolver/parse.rs | 4 ++-- ethers-solc/src/utils.rs | 2 +- 4 files changed, 7 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9fb231c3..93feaa97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2280,17 +2280,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-bigint" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - [[package]] name = "num-integer" version = "0.1.44" @@ -2301,18 +2290,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "num-rational" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.14" @@ -3579,15 +3556,13 @@ dependencies = [ [[package]] name = "solang-parser" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b2ad9c159bd02219a59368133301e6195fdaa2b5d55c628ccdcd611d49235f" +checksum = "395b6e1ec5af117bd08f963c7cd80f8efd4eed51c5a332aed42b13e3f9bc860b" dependencies = [ + "itertools", "lalrpop", "lalrpop-util", - "num-bigint", - "num-rational", - "num-traits", "phf", "unicode-xid", ] diff --git a/ethers-solc/Cargo.toml b/ethers-solc/Cargo.toml index 0fdf5c43..8427ede4 100644 --- a/ethers-solc/Cargo.toml +++ b/ethers-solc/Cargo.toml @@ -35,7 +35,7 @@ tempfile = { version = "3.3.0", optional = true } fs_extra = { version = "1.2.0", optional = true } sha2 = { version = "0.9.8", default-features = false, optional = true } dunce = "1.0.2" -solang-parser = { default-features = false, version = "0.1.12" } +solang-parser = { default-features = false, version = "=0.1.13" } rayon = "1.5.2" rand = { version = "0.8.5", optional = true } path-slash = "0.1.4" diff --git a/ethers-solc/src/resolver/parse.rs b/ethers-solc/src/resolver/parse.rs index 4bcd8807..642b5104 100644 --- a/ethers-solc/src/resolver/parse.rs +++ b/ethers-solc/src/resolver/parse.rs @@ -49,7 +49,7 @@ impl SolData { Ok((units, _)) => { for unit in units.0 { match unit { - SourceUnitPart::PragmaDirective(loc, _, pragma, value) => { + SourceUnitPart::PragmaDirective(loc, pragma, value) => { if pragma.name == "solidity" { // we're only interested in the solidity version pragma version = Some(SolDataUnit::from_loc(value.string.clone(), loc)); @@ -60,7 +60,7 @@ impl SolData { Some(SolDataUnit::from_loc(value.string.clone(), loc)); } } - SourceUnitPart::ImportDirective(_, import) => { + SourceUnitPart::ImportDirective(import) => { let (import, ids, loc) = match import { Import::Plain(s, l) => (s, vec![], l), Import::GlobalSymbol(s, i, l) => (s, vec![(i, None)], l), diff --git a/ethers-solc/src/utils.rs b/ethers-solc/src/utils.rs index 48e2cb59..825107ea 100644 --- a/ethers-solc/src/utils.rs +++ b/ethers-solc/src/utils.rs @@ -415,7 +415,7 @@ mod tests { let (unit, _) = solang_parser::parse(s, 0).unwrap(); assert_eq!(unit.0.len(), 1); match unit.0[0] { - SourceUnitPart::ImportDirective(_, _) => {} + SourceUnitPart::ImportDirective(_) => {} _ => unreachable!("failed to parse import"), } let imports: Vec<_> = find_import_paths(s).map(|m| m.as_str()).collect();