Skip to content

Commit

Permalink
fix compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbuild3r committed Nov 9, 2023
1 parent f353847 commit 4f01d09
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ cli-batteries = { git = "https://github.com/recmo/cli-batteries", rev = "fc1186d
] }
cognitoauth = { git = "https://github.com/lucdew/cognito-srp-auth.git" }
ethers = { version = "2.0.10", features = ["ws", "ipc", "openssl", "abigen"] }
ethers-solc = "2.0.10"
eyre = "0.6"
futures = "0.3"
futures-util = { version = "^0.3" }
Expand Down
8 changes: 4 additions & 4 deletions tests/common/chain_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ use std::time::Duration;
use ethers::abi::AbiEncode;
use ethers::contract::Contract;
use ethers::core::k256::ecdsa::SigningKey;
use ethers::prelude::artifacts::BytecodeObject;
use ethers::prelude::{
ContractFactory, Http, LocalWallet, NonceManagerMiddleware, Provider, Signer, SignerMiddleware,
Wallet,
};
use ethers::providers::Middleware;
use ethers::types::{Bytes, H256, U256};
use ethers::types::{Bytes, U256};
use ethers::utils::{Anvil, AnvilInstance};
use ethers_solc::artifacts::BytecodeObject;
use tracing::{info, instrument};

use super::{abi as ContractAbi, CompiledContract};
Expand All @@ -22,7 +22,7 @@ pub type SpecialisedContract = Contract<SpecialisedClient>;

pub struct MockChain {
pub anvil: AnvilInstance,
pub private_key: H256,
pub private_key: SigningKey,
pub identity_manager: SpecialisedContract,
}

Expand All @@ -34,7 +34,7 @@ pub async fn spawn_mock_chain(
tree_depth: u8,
) -> anyhow::Result<MockChain> {
let chain = Anvil::new().block_time(2u64).spawn();
let private_key = H256::from_slice(&chain.keys()[0].to_be_bytes());
let private_key = chain.keys()[0].clone().into();

let provider = Provider::<Http>::try_from(chain.endpoint())
.expect("Failed to initialize chain endpoint")
Expand Down
5 changes: 2 additions & 3 deletions tests/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ pub mod prelude {
pub use ethers::core::abi::Abi;
pub use ethers::core::k256::ecdsa::SigningKey;
pub use ethers::core::rand;
pub use ethers::prelude::artifacts::{Bytecode, BytecodeObject};
pub use ethers::prelude::{
ContractFactory, Http, LocalWallet, NonceManagerMiddleware, Provider, Signer,
SignerMiddleware, Wallet,
};
pub use ethers::providers::Middleware;
pub use ethers::types::{Bytes, H256, U256};
pub use ethers::utils::{Anvil, AnvilInstance};
pub use ethers_solc::artifacts::{Bytecode, BytecodeObject};
pub use hyper::client::HttpConnector;
pub use hyper::{Body, Client, Request};
pub use once_cell::sync::Lazy;
Expand Down Expand Up @@ -651,8 +651,7 @@ pub async fn spawn_deps(

let chain = chain?;

let signing_key = SigningKey::from_bytes(chain.private_key.as_bytes())?;
let micro_oz = micro_oz::spawn(chain.anvil.endpoint(), signing_key).await?;
let micro_oz = micro_oz::spawn(chain.anvil.endpoint(), chain.private_key.clone()).await?;

let insertion_provers = insertion_provers
.into_iter()
Expand Down

0 comments on commit 4f01d09

Please sign in to comment.