File tree 1 file changed +17
-15
lines changed 1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change 1
1
import { BigNumber } from "ethers" ;
2
2
3
- export type ContractEventV5 = {
4
- eventName : string ;
5
- args : Record < string , any > ;
6
- address : string ;
7
- topic : string [ ] ;
8
- data : string ;
9
- blockNumber : bigint ;
10
- transactionHash : string ;
11
- transactionIndex : number ;
12
- blockHash : string ;
13
- logIndex : number ;
14
- removed : boolean ;
15
- } ;
16
-
17
3
export type ContractEventV4 = {
18
4
eventName : string ;
19
5
data : Record < string , any > ;
@@ -32,11 +18,27 @@ export type ContractEventV4 = {
32
18
} ;
33
19
} ;
34
20
21
+ export type ContractEventV5 = {
22
+ eventName : string ;
23
+ args : Record < string , any > ;
24
+ address : string ;
25
+ topic : string [ ] ;
26
+ data : string ;
27
+ blockNumber : bigint ;
28
+ transactionHash : string ;
29
+ transactionIndex : number ;
30
+ blockHash : string ;
31
+ logIndex : number ;
32
+ removed : boolean ;
33
+ } ;
34
+
35
35
/**
36
36
* Mapping of events v5 response to v4 for backward compatiblity.
37
37
* Clients may be using this api and dont want to break things.
38
38
*/
39
- export function toContractEventV4Schema ( eventV5 : ContractEventV5 ) {
39
+ export function toContractEventV4Schema (
40
+ eventV5 : ContractEventV5 ,
41
+ ) : ContractEventV4 {
40
42
const eventName = eventV5 . eventName ;
41
43
42
44
// backwards compatibility of BigInt(v5) to BigNumber(v4)
You can’t perform that action at this time.
0 commit comments