Skip to content

Commit

Permalink
remove anyhow from lib crate
Browse files Browse the repository at this point in the history
  • Loading branch information
insipx committed Apr 9, 2024
1 parent 142e964 commit a7d7705
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions xmtp_id/src/erc1271_verifier.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
use ethers::contract::abigen;
use ethers::providers::{Http, Provider};
use ethers::types::{Address, BlockNumber, Bytes};
use std::convert::TryFrom;
use std::sync::Arc;
use thiserror::Error;

#[derive(Debug, Error)]
pub enum VerifierError {}
pub enum VerifierError {
#[error("calling smart contract {0}")]
Contract(#[from] ethers::contract::ContractError<Provider<Http>>),
}

const EIP1271_MAGIC_VALUE: [u8; 4] = [0x16, 0x26, 0xba, 0x7e];

Expand All @@ -18,6 +20,7 @@ abigen!(
derives(serde::Serialize, serde::Deserialize)
);

#[derive(Debug)]
pub struct ERC1271Verifier {
pub provider: Arc<Provider<Http>>,
}
Expand Down Expand Up @@ -59,16 +62,15 @@ mod tests {
use super::*;
use ethers::{
abi::{self, Token},
providers::{Http, Middleware, Provider},
types::{Bytes, H256, U256},
providers::Middleware,
types::{H256, U256},
};

use ethers::{
core::utils::Anvil,
middleware::SignerMiddleware,
signers::{LocalWallet, Signer as _},
};
use std::{convert::TryFrom, sync::Arc};

abigen!(
CoinbaseSmartWallet,
Expand Down

0 comments on commit a7d7705

Please sign in to comment.