From ef51f566fe1565d81692590424b8bba9fdfd6302 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Fri, 17 Mar 2023 14:16:09 +0100 Subject: [PATCH] chore(deps): bump revm and use new utils (#1816) --- Cargo.lock | 8 ++++---- Cargo.toml | 4 ++-- crates/rpc/rpc/src/eth/error.rs | 10 ++-------- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 455fb0ddc9..d5bd3c910f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5347,7 +5347,7 @@ dependencies = [ [[package]] name = "revm" version = "3.0.0" -source = "git+https://github.com/bluealloy/revm?rev=afc3066#afc30663270f77df9b4399ad9d4cfb0ad2b814ec" +source = "git+https://github.com/bluealloy/revm#3d8ca6641d2e72448c23f4596f769c8fd1c784d1" dependencies = [ "auto_impl", "revm-interpreter", @@ -5357,7 +5357,7 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "1.0.0" -source = "git+https://github.com/bluealloy/revm?rev=afc3066#afc30663270f77df9b4399ad9d4cfb0ad2b814ec" +source = "git+https://github.com/bluealloy/revm#3d8ca6641d2e72448c23f4596f769c8fd1c784d1" dependencies = [ "derive_more", "enumn", @@ -5368,7 +5368,7 @@ dependencies = [ [[package]] name = "revm-precompile" version = "2.0.0" -source = "git+https://github.com/bluealloy/revm?rev=afc3066#afc30663270f77df9b4399ad9d4cfb0ad2b814ec" +source = "git+https://github.com/bluealloy/revm#3d8ca6641d2e72448c23f4596f769c8fd1c784d1" dependencies = [ "k256 0.11.6", "num", @@ -5384,7 +5384,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "1.0.0" -source = "git+https://github.com/bluealloy/revm?rev=afc3066#afc30663270f77df9b4399ad9d4cfb0ad2b814ec" +source = "git+https://github.com/bluealloy/revm#3d8ca6641d2e72448c23f4596f769c8fd1c784d1" dependencies = [ "arbitrary", "auto_impl", diff --git a/Cargo.toml b/Cargo.toml index 0481e20bd9..0da5e418d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,7 +48,7 @@ inherits = "release" debug = true [patch.crates-io] -revm = { git = "https://github.com/bluealloy/revm", rev = "afc3066" } -revm-primitives = { git = "https://github.com/bluealloy/revm", rev = "afc3066" } +revm = { git = "https://github.com/bluealloy/revm" } +revm-primitives = { git = "https://github.com/bluealloy/revm" } # patched for quantity U256 responses ruint = { git = "https://github.com/paradigmxyz/uint" } diff --git a/crates/rpc/rpc/src/eth/error.rs b/crates/rpc/rpc/src/eth/error.rs index 8260db82a8..0615a39df0 100644 --- a/crates/rpc/rpc/src/eth/error.rs +++ b/crates/rpc/rpc/src/eth/error.rs @@ -5,7 +5,7 @@ use jsonrpsee::{core::Error as RpcError, types::error::INVALID_PARAMS_CODE}; use reth_primitives::{constants::SELECTOR_LEN, Address, Bytes, U256}; use reth_rpc_types::{error::EthRpcErrorCode, BlockError}; use reth_transaction_pool::error::{InvalidPoolTransactionError, PoolError}; -use revm::primitives::{EVMError, ExecutionResult, Halt, OutOfGasError, Output}; +use revm::primitives::{EVMError, ExecutionResult, Halt, OutOfGasError}; /// Result alias pub type EthResult = Result; @@ -368,13 +368,7 @@ pub enum SignError { /// [ExecutionResult::Success]. pub(crate) fn ensure_success(result: ExecutionResult) -> EthResult { match result { - ExecutionResult::Success { output, .. } => { - let data = match output { - Output::Call(data) => data, - Output::Create(data, _) => data, - }; - Ok(data.into()) - } + ExecutionResult::Success { output, .. } => Ok(output.into_data().into()), ExecutionResult::Revert { output, .. } => { Err(InvalidTransactionError::Revert(RevertError::new(output)).into()) }