@@ -6,7 +6,7 @@ use crate::TransactionInfoWithProof;
6
6
use anyhow:: { bail, Result } ;
7
7
use starcoin_crypto:: HashValue ;
8
8
use starcoin_service_registry:: { ActorService , ServiceHandler , ServiceRef } ;
9
- use starcoin_types:: contract_event:: { ContractEvent , ContractEventInfo } ;
9
+ use starcoin_types:: contract_event:: { ContractEvent , StcContractEventInfo } ;
10
10
use starcoin_types:: filter:: Filter ;
11
11
use starcoin_types:: startup_info:: ChainStatus ;
12
12
use starcoin_types:: transaction:: { RichTransactionInfo , Transaction } ;
@@ -48,7 +48,7 @@ pub trait ReadableChainService {
48
48
reverse : bool ,
49
49
count : u64 ,
50
50
) -> Result < Vec < Block > > ;
51
- fn get_main_events ( & self , filter : Filter ) -> Result < Vec < ContractEventInfo > > ;
51
+ fn get_main_events ( & self , filter : Filter ) -> Result < Vec < StcContractEventInfo > > ;
52
52
fn get_block_ids (
53
53
& self ,
54
54
start_number : BlockNumber ,
@@ -101,7 +101,10 @@ pub trait ChainAsyncService:
101
101
block_hash : HashValue ,
102
102
idx : u64 ,
103
103
) -> Result < Option < RichTransactionInfo > > ;
104
- async fn get_events_by_txn_hash ( & self , txn_hash : HashValue ) -> Result < Vec < ContractEventInfo > > ;
104
+ async fn get_events_by_txn_hash (
105
+ & self ,
106
+ txn_hash : HashValue ,
107
+ ) -> Result < Vec < StcContractEventInfo > > ;
105
108
/// for main
106
109
async fn main_head_header ( & self ) -> Result < BlockHeader > ;
107
110
async fn main_head_block ( & self ) -> Result < Block > ;
@@ -116,7 +119,7 @@ pub trait ChainAsyncService:
116
119
-> Result < Option < BlockHeader > > ;
117
120
async fn main_startup_info ( & self ) -> Result < StartupInfo > ;
118
121
async fn main_status ( & self ) -> Result < ChainStatus > ;
119
- async fn main_events ( & self , filter : Filter ) -> Result < Vec < ContractEventInfo > > ;
122
+ async fn main_events ( & self , filter : Filter ) -> Result < Vec < StcContractEventInfo > > ;
120
123
async fn get_block_ids (
121
124
& self ,
122
125
start_number : BlockNumber ,
@@ -271,7 +274,10 @@ where
271
274
bail ! ( "get txn info by block and idx error." )
272
275
}
273
276
}
274
- async fn get_events_by_txn_hash ( & self , txn_hash : HashValue ) -> Result < Vec < ContractEventInfo > > {
277
+ async fn get_events_by_txn_hash (
278
+ & self ,
279
+ txn_hash : HashValue ,
280
+ ) -> Result < Vec < StcContractEventInfo > > {
275
281
let response = self
276
282
. send ( ChainRequest :: GetEventsByTxnHash { txn_hash } )
277
283
. await ??;
@@ -357,7 +363,7 @@ where
357
363
}
358
364
}
359
365
360
- async fn main_events ( & self , filter : Filter ) -> Result < Vec < ContractEventInfo > > {
366
+ async fn main_events ( & self , filter : Filter ) -> Result < Vec < StcContractEventInfo > > {
361
367
let response = self . send ( ChainRequest :: MainEvents ( filter) ) . await ??;
362
368
if let ChainResponse :: MainEvents ( evts) = response {
363
369
Ok ( evts)
0 commit comments