1
- use ethers_core:: types:: SyncingStatus ;
2
-
3
1
use crate :: {
4
2
call_raw:: CallBuilder ,
5
3
errors:: ProviderError ,
@@ -22,11 +20,14 @@ use async_trait::async_trait;
22
20
use ethers_core:: {
23
21
abi:: { self , Detokenize , ParamType } ,
24
22
types:: {
25
- transaction:: { eip2718:: TypedTransaction , eip2930:: AccessListWithGasUsed } ,
23
+ transaction:: {
24
+ conditional:: ConditionalOptions , eip2718:: TypedTransaction ,
25
+ eip2930:: AccessListWithGasUsed ,
26
+ } ,
26
27
Address , Block , BlockId , BlockNumber , BlockTrace , Bytes , Chain , EIP1186ProofResponse ,
27
28
FeeHistory , Filter , FilterBlockOption , GethDebugTracingCallOptions ,
28
- GethDebugTracingOptions , GethTrace , Log , NameOrAddress , Selector , Signature , Trace ,
29
- TraceFilter , TraceType , Transaction , TransactionReceipt , TransactionRequest , TxHash ,
29
+ GethDebugTracingOptions , GethTrace , Log , NameOrAddress , Selector , Signature , SyncingStatus ,
30
+ Trace , TraceFilter , TraceType , Transaction , TransactionReceipt , TransactionRequest , TxHash ,
30
31
TxpoolContent , TxpoolInspect , TxpoolStatus , H256 , U256 , U64 ,
31
32
} ,
32
33
utils,
@@ -581,6 +582,17 @@ impl<P: JsonRpcClient> Middleware for Provider<P> {
581
582
Ok ( PendingTransaction :: new ( tx_hash, self ) )
582
583
}
583
584
585
+ async fn send_raw_transaction_conditional < ' a > (
586
+ & ' a self ,
587
+ tx : Bytes ,
588
+ options : ConditionalOptions ,
589
+ ) -> Result < PendingTransaction < ' a , P > , ProviderError > {
590
+ let rlp = utils:: serialize ( & tx) ;
591
+ let options = utils:: serialize ( & options) ;
592
+ let tx_hash = self . request ( "eth_sendRawTransactionConditional" , [ rlp, options] ) . await ?;
593
+ Ok ( PendingTransaction :: new ( tx_hash, self ) )
594
+ }
595
+
584
596
async fn is_signer ( & self ) -> bool {
585
597
match self . from {
586
598
Some ( sender) => self . sign ( vec ! [ ] , & sender) . await . is_ok ( ) ,
0 commit comments