Added logic for ABI

This commit is contained in:
activecoder10
2025-07-04 12:09:21 +03:00
parent 48ed8db4db
commit a0279f0c0c
4 changed files with 77 additions and 34 deletions
+5 -2
View File
@@ -1,6 +1,7 @@
//! The go-ethereum node implementation.
use std::{
collections::HashMap as StdHashMap,
fs::{File, create_dir_all, remove_dir_all},
io::{BufRead, BufReader, Read, Write},
path::PathBuf,
@@ -50,7 +51,7 @@ pub struct Instance {
network_id: u64,
start_timeout: u64,
wallet: EthereumWallet,
nonces: Mutex<HashMap<Address, u64>>,
nonces: Mutex<StdHashMap<Address, u64>>,
}
impl Instance {
@@ -158,6 +159,8 @@ impl EthereumNode for Instance {
let connection_string = self.connection_string();
let wallet = self.wallet.clone();
log::debug!("Submitting transaction: {:#?}", transaction);
execute_transaction(Box::pin(async move {
Ok(ProviderBuilder::new()
.wallet(wallet)
@@ -235,7 +238,7 @@ impl Node for Instance {
network_id: config.network_id,
start_timeout: config.geth_start_timeout,
wallet: config.wallet(),
nonces: Mutex::new(HashMap::new()),
nonces: Mutex::new(StdHashMap::new()),
}
}
+5 -2
View File
@@ -1,4 +1,5 @@
use std::{
collections::HashMap as StdHashMap,
fs::create_dir_all,
io::BufRead,
path::PathBuf,
@@ -44,7 +45,7 @@ pub struct KitchensinkNode {
base_directory: PathBuf,
process_substrate: Option<Child>,
process_proxy: Option<Child>,
nonces: Mutex<HashMap<Address, u64>>,
nonces: Mutex<StdHashMap<Address, u64>>,
}
impl KitchensinkNode {
@@ -251,6 +252,8 @@ impl EthereumNode for KitchensinkNode {
let url = self.rpc_url.clone();
let wallet = self.wallet.clone();
log::debug!("Submitting transaction: {:#?}", transaction);
execute_transaction(Box::pin(async move {
Ok(ProviderBuilder::new()
.wallet(wallet)
@@ -325,7 +328,7 @@ impl Node for KitchensinkNode {
base_directory,
process_substrate: None,
process_proxy: None,
nonces: Mutex::new(HashMap::new()),
nonces: Mutex::new(StdHashMap::new()),
}
}