-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add L2EthApiExt trait (#13539)
- Loading branch information
Showing
3 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
//! `eth_` Extension traits. | ||
use alloy_primitives::{Bytes, B256}; | ||
use alloy_rpc_types_eth::erc4337::ConditionalOptions; | ||
use jsonrpsee::{core::RpcResult, proc_macros::rpc}; | ||
|
||
/// Extension trait for `eth_` namespace for L2s. | ||
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "eth"))] | ||
#[cfg_attr(feature = "client", rpc(server, client, namespace = "eth"))] | ||
pub trait L2EthApiExt { | ||
/// Sends signed transaction with the given condition. | ||
#[method(name = "sendRawTransactionConditional")] | ||
async fn send_raw_transaction_conditional( | ||
&self, | ||
bytes: Bytes, | ||
condition: ConditionalOptions, | ||
) -> RpcResult<B256>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters