Skip to content

Commit

Permalink
bump ethers-rs dependencies to onbjerg's ast (#3899)
Browse files Browse the repository at this point in the history
* patch ethers with onbjerg ast

* pin rev

* chore(deps): bump ethers

* rm rev patch

* fix breaking change

* chore(deps): bump ethers

* update error

* rename source location

* chore(deps): bump ethers

Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
iFrostizz and mattsse authored Dec 23, 2022
1 parent 4ea323d commit e8d8b86
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 30 deletions.
56 changes: 33 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ dialoguer = { version = "0.10.2", default-features = false }
# async / parallel
tokio = { version = "1", features = ["macros"] }
futures = "0.3.17"
rayon = "1.5.1"
rayon = "1.6.1"
async-trait = "0.1.53"

# disk / paths
Expand Down
4 changes: 2 additions & 2 deletions config/src/chain.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::U256;
use ethers_core::types::{ParseChainError, U64};
use ethers_core::types::U64;
use open_fastrlp::{Decodable, Encodable};
use serde::{Deserialize, Deserializer, Serialize};
use std::{fmt, str::FromStr};
Expand Down Expand Up @@ -97,7 +97,7 @@ impl From<Chain> for U256 {
}

impl TryFrom<Chain> for ethers_core::types::Chain {
type Error = ParseChainError;
type Error = <ethers_core::types::Chain as TryFrom<u64>>::Error;

fn try_from(chain: Chain) -> Result<Self, Self::Error> {
match chain {
Expand Down
6 changes: 3 additions & 3 deletions evm/src/coverage/analysis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl<'a> ContractVisitor<'a> {
// is virtually impossible to correctly map instructions back to branches that
// include more complex logic like conditional logic.
self.push_branches(
&ethers::solc::artifacts::ast::SourceLocation {
&ethers::solc::artifacts::ast::LowFidelitySourceLocation {
start: node.src.start,
length: true_body
.src
Expand Down Expand Up @@ -374,7 +374,7 @@ impl<'a> ContractVisitor<'a> {
self.items.push(item);
}

fn source_location_for(&self, loc: &ast::SourceLocation) -> SourceLocation {
fn source_location_for(&self, loc: &ast::LowFidelitySourceLocation) -> SourceLocation {
SourceLocation {
source_id: self.source_id,
contract_name: self.contract_name.clone(),
Expand All @@ -384,7 +384,7 @@ impl<'a> ContractVisitor<'a> {
}
}

fn push_branches(&mut self, loc: &ast::SourceLocation, branch_id: usize) {
fn push_branches(&mut self, loc: &ast::LowFidelitySourceLocation, branch_id: usize) {
self.push_item(CoverageItem {
kind: CoverageItemKind::Branch { branch_id, path_id: 0 },
loc: self.source_location_for(loc),
Expand Down
2 changes: 1 addition & 1 deletion forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tokio = { version = "1", features = ["time"] }
tracing = "0.1"
tracing-subscriber = "0.3"
proptest = "1.0.0"
rayon = "1.5"
rayon = "1.6.1"
rlp = "0.5.1"
once_cell = "1.13"
comfy-table = "6.0.0"
Expand Down

0 comments on commit e8d8b86

Please sign in to comment.