mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 02:49:55 +00:00
fix: Implement transact_system_call per HyperEVM spec
This commit is contained in:
@ -15,11 +15,12 @@ use reth::{
|
|||||||
use reth_evm::{Evm, EvmEnv};
|
use reth_evm::{Evm, EvmEnv};
|
||||||
use revm::{
|
use revm::{
|
||||||
context::{
|
context::{
|
||||||
result::{EVMError, HaltReason, ResultAndState},
|
result::{EVMError, ExecutionResult, HaltReason, Output, ResultAndState, SuccessReason},
|
||||||
BlockEnv, TxEnv,
|
BlockEnv, TxEnv,
|
||||||
},
|
},
|
||||||
handler::{instructions::EthInstructions, EthPrecompiles, PrecompileProvider},
|
handler::{instructions::EthInstructions, EthPrecompiles, PrecompileProvider},
|
||||||
interpreter::{interpreter::EthInterpreter, InterpreterResult},
|
interpreter::{interpreter::EthInterpreter, InterpreterResult},
|
||||||
|
state::EvmState,
|
||||||
Context, Database, ExecuteEvm, InspectEvm, Inspector,
|
Context, Database, ExecuteEvm, InspectEvm, Inspector,
|
||||||
};
|
};
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
@ -109,7 +110,18 @@ where
|
|||||||
_contract: Address,
|
_contract: Address,
|
||||||
_data: Bytes,
|
_data: Bytes,
|
||||||
) -> Result<ResultAndState<Self::HaltReason>, Self::Error> {
|
) -> Result<ResultAndState<Self::HaltReason>, Self::Error> {
|
||||||
unimplemented!()
|
// NOTE: (HACK) Per hyper-evm-sync, HyperEVM doesn't seem to call this method, so we just return a success result with no changes
|
||||||
|
// This is used for block traces. In a long term, consider implementing SystemCaller.
|
||||||
|
Ok(ResultAndState::new(
|
||||||
|
ExecutionResult::Success {
|
||||||
|
reason: SuccessReason::Stop,
|
||||||
|
gas_used: 0,
|
||||||
|
gas_refunded: 0,
|
||||||
|
logs: vec![],
|
||||||
|
output: Output::Call(Bytes::new()),
|
||||||
|
},
|
||||||
|
EvmState::default(),
|
||||||
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn db_mut(&mut self) -> &mut Self::DB {
|
fn db_mut(&mut self) -> &mut Self::DB {
|
||||||
|
|||||||
Reference in New Issue
Block a user