From a7d7705c3b667b768bacd910c055bac7bb4beaca Mon Sep 17 00:00:00 2001 From: Andrew Plaza Date: Tue, 9 Apr 2024 15:44:31 -0400 Subject: [PATCH] remove anyhow from lib crate --- xmtp_id/src/erc1271_verifier.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/xmtp_id/src/erc1271_verifier.rs b/xmtp_id/src/erc1271_verifier.rs index 1c098e66b..fe65fa40c 100644 --- a/xmtp_id/src/erc1271_verifier.rs +++ b/xmtp_id/src/erc1271_verifier.rs @@ -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>), +} const EIP1271_MAGIC_VALUE: [u8; 4] = [0x16, 0x26, 0xba, 0x7e]; @@ -18,6 +20,7 @@ abigen!( derives(serde::Serialize, serde::Deserialize) ); +#[derive(Debug)] pub struct ERC1271Verifier { pub provider: Arc>, } @@ -59,8 +62,8 @@ mod tests { use super::*; use ethers::{ abi::{self, Token}, - providers::{Http, Middleware, Provider}, - types::{Bytes, H256, U256}, + providers::Middleware, + types::{H256, U256}, }; use ethers::{ @@ -68,7 +71,6 @@ mod tests { middleware::SignerMiddleware, signers::{LocalWallet, Signer as _}, }; - use std::{convert::TryFrom, sync::Arc}; abigen!( CoinbaseSmartWallet,