Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
fix clippy error: module inception
Browse files Browse the repository at this point in the history
  • Loading branch information
AronisAt79 committed Oct 5, 2023
1 parent 756fdcd commit cf3e5a0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
4 changes: 3 additions & 1 deletion integration-tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ fn generate_rust_contract_bindings(bindings_dir: &str, file: &Path) {

let contractnamevector: Vec<&str> = filename.split(DOT).collect();
let contractname = contractnamevector[0].to_lowercase();
let destpath = format!("{}{}{}", "bindings_", contractname, ".rs");
let destpath =
Path::new(&bindings_dir).join([contractname.clone(), "rs".to_string()].join("."));
// Path::new(&bindings_dir).join([contractname.clone(), "rs".to_string()].join("."));
Path::new(&bindings_dir).join(destpath);
let _ = Abigen::new(
contractname,
abi_source.into_os_string().into_string().expect("error"),
Expand Down
17 changes: 10 additions & 7 deletions integration-tests/src/bin/gen_blockchain_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ use ethers::{
signers::Signer,
};
use integration_tests::{
benchmarks::*, get_client, get_provider, get_wallet, greeter::*, log_init,
openzeppelinerc20testtoken::openzeppelinerc20testtoken as ozerc20tt, GenDataOutput,
bindings_benchmarks::{benchmarks::benchmarks, Len},
bindings_greeter::greeter::greeter,
bindings_openzeppelinerc20testtoken::openzeppelinerc_2_0testtoken::openzeppelinerc20testtoken as ozerc20tt,
get_client, get_provider, get_wallet, log_init, GenDataOutput,
};

use log::{error, info};
use std::{collections::HashMap, fs::File, sync::Arc, thread::sleep, time::Duration};

Expand Down Expand Up @@ -51,7 +54,7 @@ where
(c_abi, contract_address, block_number, contract_instance)
}

async fn dump_tx_trace(prov: Provider<Http>, receipt: TransactionReceipt, name: &str) -> () {
async fn dump_tx_trace(prov: Provider<Http>, receipt: TransactionReceipt, name: &str) {
let options = GethDebugTracingOptions::default();
let trace = prov
.debug_trace_transaction(receipt.transaction_hash, options)
Expand Down Expand Up @@ -157,7 +160,7 @@ async fn main() {
let prov_wallet0 = Arc::new(SignerMiddleware::new(get_provider(), wallet0));

// Greeter
let greeter_deployer = greeter::greeter::deploy(prov_wallet0.clone(), U256::from(42))
let greeter_deployer = greeter::deploy(prov_wallet0.clone(), U256::from(42))
.expect("Error building deployment Transaction");
let (contract_abi, contract_address, block_number, _greeter_instance) =
deploy(greeter_deployer, "Greeter").await;
Expand Down Expand Up @@ -185,7 +188,7 @@ async fn main() {
//

// Benchmarks
let benchmarks_deployer = benchmarks::benchmarks::deploy(prov_wallet0.clone(), ())
let benchmarks_deployer = benchmarks::deploy(prov_wallet0.clone(), ())
.expect("Error building deployment Transaction");
let (contract_abi, contract_address, block_number, benchmarks_instance) =
deploy(benchmarks_deployer, "Benchmarks").await;
Expand Down Expand Up @@ -346,7 +349,7 @@ async fn main() {
// MLOAD (EVM)
info!("Sending Tx optimized for maximum MLOAD opcode calls up to 300k gas");
cli.miner_start().await.expect("cannot start miner");
let bench_tx = benchmarks_instance.check_mload(benchmarks::Len(77500));
let bench_tx = benchmarks_instance.check_mload(Len(77500));
let tx_call = bench_tx
.send()
.await
Expand All @@ -364,7 +367,7 @@ async fn main() {
// SDIV (STATE)
info!("Sending Tx optimized for maximum SDIV opcode calls up to 300k gas");
cli.miner_start().await.expect("cannot start miner");
let bench_tx = benchmarks_instance.check_sdiv(benchmarks::Len(32400));
let bench_tx = benchmarks_instance.check_sdiv(Len(32400));
let tx_call = bench_tx
.send()
.await
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ pub struct CompiledContract {
}

#[allow(missing_docs)]
pub mod benchmarks;
pub mod bindings_benchmarks;
#[allow(missing_docs)]
pub mod greeter;
pub mod bindings_greeter;
#[allow(missing_docs)]
pub mod bindings_openzeppelinerc20testtoken;
/// Common code for integration tests of circuits.
pub mod integration_test_circuits;
#[allow(missing_docs)]
pub mod openzeppelinerc20testtoken;

0 comments on commit cf3e5a0

Please sign in to comment.