Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Request evm env filling in ethapi #9296

Closed
Tracked by #9294 ...
mattsse opened this issue Jul 4, 2024 · 4 comments · Fixed by #9358
Closed
Tracked by #9294 ...

Integrate Request evm env filling in ethapi #9296

mattsse opened this issue Jul 4, 2024 · 4 comments · Fixed by #9358
Assignees
Labels
A-rpc Related to the RPC implementation D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Jul 4, 2024

creating the TxEnv based on the TxRequest is done via:

/// Configures a new [`TxEnv`] for the [`TransactionRequest`]
///
/// All [`TxEnv`] fields are derived from the given [`TransactionRequest`], if fields are `None`,
/// they fall back to the [`BlockEnv`]'s settings.
pub fn create_txn_env(block_env: &BlockEnv, request: TransactionRequest) -> EthResult<TxEnv> {

which currently requires OP feature

#[cfg(feature = "optimism")]
optimism: OptimismFields { enveloped_tx: Some(Bytes::new()), ..Default::default() },

this should be abstracted into a trait, ref:

pub trait Call: LoadState + SpawnBlocking {

Ideally something new ConfigureEvmCallEnv or similar

@mattsse mattsse added A-rpc Related to the RPC implementation D-good-first-issue Nice and easy! A great choice to get started labels Jul 4, 2024
@nkysg
Copy link
Contributor

nkysg commented Jul 4, 2024

can I take this?

@mattsse
Copy link
Collaborator Author

mattsse commented Jul 4, 2024

assigned

@mattsse
Copy link
Collaborator Author

mattsse commented Jul 4, 2024

@nkysg
for the initial pr I'm fine with keeping the feature and simply move the function as is into a trait that is implemented on EthApi

@nkysg
Copy link
Contributor

nkysg commented Jul 4, 2024

@mattsse OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation D-good-first-issue Nice and easy! A great choice to get started
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants