Skip to content

Commit

Permalink
fix test_register_and_update_operator
Browse files Browse the repository at this point in the history
  • Loading branch information
supernovahs committed Jan 31, 2025
1 parent 1037092 commit b85eabd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/chainio/clients/elcontracts/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ mod tests {
let el_chain_writer =
new_test_writer(http_endpoint.to_string(), private_key.to_string()).await;

set_account_balance(&container, address_str).await;
set_account_balance(&container, address_str, "http://localhost:8546").await;
let address = Address::from_str(address_str).unwrap();

let operator = Operator {
Expand Down
8 changes: 7 additions & 1 deletion testing/testing-utils/src/anvil.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,17 @@ pub async fn start_anvil_container() -> (ContainerAsync<GenericImage>, String, S
}

/// Deposit 1 eth to the account in anvil
pub async fn set_account_balance(container: &ContainerAsync<GenericImage>, address: &str) {
pub async fn set_account_balance(
container: &ContainerAsync<GenericImage>,
address: &str,
port: &str,
) {
let mut output = container
.exec(ExecCommand::new([
"cast",
"rpc",
"--rpc-url",
port,
"anvil_setBalance",
address,
"0xDE0B6B3A7640000", // 1 ETH in WEI
Expand Down

0 comments on commit b85eabd

Please sign in to comment.