Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
237 changes: 112 additions & 125 deletions Cargo.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ members = [
"seth",
"dapp",
"dapptools",
"solc",
]

# Binary size optimizations
Expand Down
5 changes: 2 additions & 3 deletions dapp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ license = "MIT OR Apache-2.0"

[dependencies]
dapp-utils = { path = "./../utils" }
dapp-solc = { path = "./../solc" }
evm-adapters = { path = "./../evm-adapters", default-features = false }

# ethers = { version = "0.5.2" }
ethers = { git = "https://github.com/gakonst/ethers-rs" }
ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["solc-full"] }
svm = { package = "svm-rs", git = "https://github.com/roynalnaruto/svm-rs" }

eyre = "0.6.5"
Expand All @@ -33,4 +32,4 @@ evm-adapters = { path = "./../evm-adapters", features = ["sputnik", "sputnik-hel
evmodin = { git = "https://github.com/vorot93/evmodin", features = ["util"] }
# evm = { version = "0.30.1" }
evm = { git = "https://github.com/rust-blockchain/evm" }
dapp-solc = { path = "./../solc", features = ["sync"] }
ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["solc-full", "solc-tests"] }
72 changes: 0 additions & 72 deletions dapp/src/artifacts.rs

This file was deleted.

25 changes: 13 additions & 12 deletions dapp/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
mod artifacts;
pub use artifacts::DapptoolsArtifact;
pub use ethers::core::utils::{solc::Contract, CompiledContract};

mod runner;
pub use runner::{ContractRunner, TestResult};

Expand All @@ -17,12 +13,17 @@ pub fn decode_revert(error: &[u8]) -> Result<String> {

#[cfg(test)]
pub mod test_helpers {

use ethers::{prelude::Lazy, utils::CompiledContract};
use std::collections::HashMap;

use dapp_solc::SolcBuilder;

pub static COMPILED: Lazy<HashMap<String, CompiledContract>> =
Lazy::new(|| SolcBuilder::new("./*.sol", &[], &[]).unwrap().build_all().unwrap());
use ethers::{
prelude::Lazy,
solc::{CompilerOutput, Project, ProjectPathsConfig},
};

pub static COMPILED: Lazy<CompilerOutput> = Lazy::new(|| {
// NB: should we add a test-helper function that makes creating these
// ephemeral projects easier?
let paths =
ProjectPathsConfig::builder().root("testdata").sources("testdata").build().unwrap();
let project = Project::builder().paths(paths).ephemeral().no_artifacts().build().unwrap();
project.compile().unwrap().output()
});
}
Loading