19
19
20
20
21
21
class Price :
22
- def __init__ (self , conf , expo , price , publish_time ):
22
+ def __init__ (self , conf , expo , price , publish_time ) -> None :
23
23
self .conf = conf
24
24
self .expo = expo
25
25
self .price = price
@@ -38,7 +38,7 @@ def to_dict(self):
38
38
39
39
40
40
class PriceUpdate :
41
- def __init__ (self , ema_price , price_id , price ):
41
+ def __init__ (self , ema_price , price_id , price ) -> None :
42
42
self .ema_price = ema_price
43
43
self .id = price_id
44
44
self .price = price
@@ -66,7 +66,7 @@ def __init__(
66
66
last_attested_publish_time ,
67
67
price_feed ,
68
68
emitter_chain_id ,
69
- ):
69
+ ) -> None :
70
70
self .seq_num = seq_num
71
71
self .vaa = vaa
72
72
self .publish_time = publish_time
@@ -117,7 +117,7 @@ def to_dict(self, verbose=False, vaa_format=DEFAULT_VAA_ENCODING):
117
117
class MerkleUpdate :
118
118
def __init__ (
119
119
self , message_size : int , message : bytes , proof_size : int , proof : List [bytes ]
120
- ):
120
+ ) -> None :
121
121
self .message_size = message_size
122
122
self .message = message
123
123
self .proof_size = proof_size
@@ -142,7 +142,7 @@ def __init__(
142
142
vaa : bytes ,
143
143
num_updates : int ,
144
144
updates : List [MerkleUpdate ],
145
- ):
145
+ ) -> None :
146
146
self .magic = magic
147
147
self .major_version = major_version
148
148
self .minor_version = minor_version
@@ -195,7 +195,7 @@ def encode_vaa_for_chain(vaa: str, vaa_format: str, buffer=False) -> Union[bytes
195
195
196
196
197
197
# Referenced from https://github.com/wormhole-foundation/wormhole/blob/main/sdk/js/src/vaa/wormhole.ts#L26-L56
198
- def parse_vaa (vaa , encoding ) :
198
+ def parse_vaa (vaa : str , encoding : str ) -> dict :
199
199
vaa = cast (bytes , encode_vaa_for_chain (vaa , encoding , buffer = True ))
200
200
201
201
num_signers = vaa [5 ]
0 commit comments