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 {
1717 InsufficientFee ,
1818 InvalidEmitterAddress ,
1919 TooManyUpdates ,
20+ PriceFeedNotFoundWithinRange ,
21+ NoFreshUpdate ,
2022}
2123
2224impl core:: fmt:: Debug for PythReceiverError {
@@ -43,6 +45,8 @@ impl From<PythReceiverError> for Vec<u8> {
4345 PythReceiverError :: InsufficientFee => 13 ,
4446 PythReceiverError :: InvalidEmitterAddress => 14 ,
4547 PythReceiverError :: TooManyUpdates => 15 ,
48+ PythReceiverError :: PriceFeedNotFoundWithinRange => 16 ,
49+ PythReceiverError :: NoFreshUpdate => 17 ,
4650 } ]
4751 }
4852}
Original file line number Diff line number Diff line change @@ -342,4 +342,14 @@ mod test {
342342 multiple_updates_diff_vaa_results( ) [ 1 ]
343343 ) ;
344344 }
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+ }
345355}
You can’t perform that action at this time.
0 commit comments