File tree Expand file tree Collapse file tree 4 files changed +232
-101
lines changed
target_chains/stylus/contracts Expand file tree Collapse file tree 4 files changed +232
-101
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ pub enum PythReceiverError {
17
17
InsufficientFee ,
18
18
InvalidEmitterAddress ,
19
19
TooManyUpdates ,
20
+ PriceFeedNotFoundWithinRange ,
21
+ NoFreshUpdate ,
20
22
}
21
23
22
24
impl core:: fmt:: Debug for PythReceiverError {
@@ -43,6 +45,8 @@ impl From<PythReceiverError> for Vec<u8> {
43
45
PythReceiverError :: InsufficientFee => 13 ,
44
46
PythReceiverError :: InvalidEmitterAddress => 14 ,
45
47
PythReceiverError :: TooManyUpdates => 15 ,
48
+ PythReceiverError :: PriceFeedNotFoundWithinRange => 16 ,
49
+ PythReceiverError :: NoFreshUpdate => 17 ,
46
50
} ]
47
51
}
48
52
}
Original file line number Diff line number Diff line change @@ -342,4 +342,14 @@ mod test {
342
342
multiple_updates_diff_vaa_results( ) [ 1 ]
343
343
) ;
344
344
}
345
+
346
+ #[ motsu:: test]
347
+ fn test_multiple_updates_same_id_updates_latest (
348
+ pyth_contract : Contract < PythReceiver > ,
349
+ wormhole_contract : Contract < WormholeContract > ,
350
+ alice : Address ,
351
+ ) {
352
+ pyth_wormhole_init ( & pyth_contract, & wormhole_contract, & alice) ;
353
+ alice. fund ( U256 :: from ( 200 ) ) ;
354
+ }
345
355
}
You can’t perform that action at this time.
0 commit comments