mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: Eip1559 params in extradata (#11887)
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -17,6 +17,8 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use core::convert::Infallible;
|
||||
|
||||
use alloc::{sync::Arc, vec::Vec};
|
||||
use alloy_primitives::{Address, Bytes, TxKind, U256};
|
||||
use reth_chainspec::{ChainSpec, Head};
|
||||
@ -59,6 +61,7 @@ impl EthEvmConfig {
|
||||
|
||||
impl ConfigureEvmEnv for EthEvmConfig {
|
||||
type Header = Header;
|
||||
type Error = Infallible;
|
||||
|
||||
fn fill_tx_env(&self, tx_env: &mut TxEnv, transaction: &TransactionSigned, sender: Address) {
|
||||
transaction.fill_tx_env(tx_env, sender);
|
||||
@ -131,7 +134,7 @@ impl ConfigureEvmEnv for EthEvmConfig {
|
||||
&self,
|
||||
parent: &Self::Header,
|
||||
attributes: NextBlockEnvAttributes,
|
||||
) -> (CfgEnvWithHandlerCfg, BlockEnv) {
|
||||
) -> Result<(CfgEnvWithHandlerCfg, BlockEnv), Self::Error> {
|
||||
// configure evm env based on parent block
|
||||
let cfg = CfgEnv::default().with_chain_id(self.chain_spec.chain().id());
|
||||
|
||||
@ -179,7 +182,7 @@ impl ConfigureEvmEnv for EthEvmConfig {
|
||||
blob_excess_gas_and_price,
|
||||
};
|
||||
|
||||
(CfgEnvWithHandlerCfg::new_with_spec_id(cfg, spec_id), block_env)
|
||||
Ok((CfgEnvWithHandlerCfg::new_with_spec_id(cfg, spec_id), block_env))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user