@@ -181,7 +181,7 @@ describe("PythTest", () => {
181
181
182
182
await expect (
183
183
pythTest . getPriceNoOlderThan ( TIME_PERIOD , BTC_PRICE_FEED_ID )
184
- ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 1020 " ) ; // ERROR_OUTDATED_PRICE = 1020
184
+ ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 2001 " ) ; // ERROR_OUTDATED_PRICE = 2001
185
185
} ) ;
186
186
187
187
it ( "should correctly get ema price no older than" , async ( ) => {
@@ -210,7 +210,7 @@ describe("PythTest", () => {
210
210
211
211
await expect (
212
212
pythTest . getEmaPriceNoOlderThan ( TIME_PERIOD , BTC_PRICE_FEED_ID )
213
- ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 1020 " ) ; // ERROR_OUTDATED_PRICE = 1020
213
+ ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 2001 " ) ; // ERROR_OUTDATED_PRICE = 2001
214
214
} ) ;
215
215
216
216
it ( "should correctly get ema price unsafe" , async ( ) => {
@@ -245,8 +245,8 @@ describe("PythTest", () => {
245
245
expect ( initialBtcPrice . price ) . not . toBe ( HERMES_BTC_PRICE ) ;
246
246
// Expect an error for ETH price feed as it doesn't exist initially
247
247
await expect ( pythTest . getPriceUnsafe ( ETH_PRICE_FEED_ID ) ) . rejects . toThrow (
248
- "Unable to execute get method. Got exit_code: 1019 "
249
- ) ; // ERROR_PRICE_FEED_NOT_FOUND = 1019
248
+ "Unable to execute get method. Got exit_code: 2000 "
249
+ ) ; // ERROR_PRICE_FEED_NOT_FOUND = 2000
250
250
251
251
const updateData = Buffer . from ( HERMES_BTC_ETH_UPDATE , "hex" ) ;
252
252
const updateFee = await pythTest . getUpdateFee ( updateData ) ;
@@ -280,8 +280,8 @@ describe("PythTest", () => {
280
280
const invalidUpdateData = Buffer . from ( "invalid data" ) ;
281
281
282
282
await expect ( pythTest . getUpdateFee ( invalidUpdateData ) ) . rejects . toThrow (
283
- "Unable to execute get method. Got exit_code: 1021 "
284
- ) ; // ERROR_INVALID_MAGIC = 1021
283
+ "Unable to execute get method. Got exit_code: 2002 "
284
+ ) ; // ERROR_INVALID_MAGIC = 2002
285
285
} ) ;
286
286
287
287
it ( "should fail to update price feeds with invalid data" , async ( ) => {
@@ -303,7 +303,7 @@ describe("PythTest", () => {
303
303
from : deployer . address ,
304
304
to : pythTest . address ,
305
305
success : false ,
306
- exitCode : 1021 , // ERROR_INVALID_MAGIC
306
+ exitCode : 2002 , // ERROR_INVALID_MAGIC
307
307
} ) ;
308
308
} ) ;
309
309
@@ -352,7 +352,7 @@ describe("PythTest", () => {
352
352
from : deployer . address ,
353
353
to : pythTest . address ,
354
354
success : false ,
355
- exitCode : 1024 , // ERROR_UPDATE_DATA_SOURCE_NOT_FOUND
355
+ exitCode : 2005 , // ERROR_UPDATE_DATA_SOURCE_NOT_FOUND
356
356
} ) ;
357
357
} ) ;
358
358
@@ -368,7 +368,7 @@ describe("PythTest", () => {
368
368
369
369
await expect (
370
370
pythTest . getPriceNoOlderThan ( TIME_PERIOD , BTC_PRICE_FEED_ID )
371
- ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 1020 " ) ; // ERROR_OUTDATED_PRICE = 1020
371
+ ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 2001 " ) ; // ERROR_OUTDATED_PRICE = 2001
372
372
} ) ;
373
373
374
374
it ( "should fail to update price feeds with insufficient gas" , async ( ) => {
@@ -387,7 +387,7 @@ describe("PythTest", () => {
387
387
from : deployer . address ,
388
388
to : pythTest . address ,
389
389
success : false ,
390
- exitCode : 1038 , // ERROR_INSUFFICIENT_GAS
390
+ exitCode : 3000 , // ERROR_INSUFFICIENT_GAS
391
391
} ) ;
392
392
} ) ;
393
393
@@ -413,7 +413,7 @@ describe("PythTest", () => {
413
413
from : deployer . address ,
414
414
to : pythTest . address ,
415
415
success : false ,
416
- exitCode : 1030 , // ERROR_INSUFFICIENT_FEE = 1030
416
+ exitCode : 2011 , // ERROR_INSUFFICIENT_FEE = 2011
417
417
} ) ;
418
418
} ) ;
419
419
@@ -425,15 +425,15 @@ describe("PythTest", () => {
425
425
426
426
await expect (
427
427
pythTest . getPriceUnsafe ( nonExistentPriceFeedId )
428
- ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 1019 " ) ; // ERROR_PRICE_FEED_NOT_FOUND = 1019
428
+ ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 2000 " ) ; // ERROR_PRICE_FEED_NOT_FOUND = 2000
429
429
430
430
await expect (
431
431
pythTest . getPriceNoOlderThan ( TIME_PERIOD , nonExistentPriceFeedId )
432
- ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 1019 " ) ; // ERROR_PRICE_FEED_NOT_FOUND
432
+ ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 2000 " ) ; // ERROR_PRICE_FEED_NOT_FOUND
433
433
434
434
await expect (
435
435
pythTest . getEmaPriceUnsafe ( nonExistentPriceFeedId )
436
- ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 1019 " ) ; // ERROR_PRICE_FEED_NOT_FOUND
436
+ ) . rejects . toThrow ( "Unable to execute get method. Got exit_code: 2000 " ) ; // ERROR_PRICE_FEED_NOT_FOUND
437
437
} ) ;
438
438
439
439
it ( "should correctly get chain ID" , async ( ) => {
@@ -735,7 +735,7 @@ describe("PythTest", () => {
735
735
from : deployer . address ,
736
736
to : pythTest . address ,
737
737
success : false ,
738
- exitCode : 1012 , // ERROR_INVALID_GOVERNANCE_ACTION = 1012
738
+ exitCode : 1012 , // ERROR_INVALID_GOVERNANCE_ACTION
739
739
} ) ;
740
740
741
741
// Verify that the governance data source index hasn't changed
@@ -773,7 +773,7 @@ describe("PythTest", () => {
773
773
from : deployer . address ,
774
774
to : pythTest . address ,
775
775
success : false ,
776
- exitCode : 1032 , // ERROR_INVALID_GOVERNANCE_DATA_SOURCE
776
+ exitCode : 2013 , // ERROR_INVALID_GOVERNANCE_DATA_SOURCE
777
777
} ) ;
778
778
} ) ;
779
779
@@ -809,7 +809,7 @@ describe("PythTest", () => {
809
809
from : deployer . address ,
810
810
to : pythTest . address ,
811
811
success : false ,
812
- exitCode : 1033 , // ERROR_OLD_GOVERNANCE_MESSAGE
812
+ exitCode : 2014 , // ERROR_OLD_GOVERNANCE_MESSAGE
813
813
} ) ;
814
814
} ) ;
815
815
@@ -839,7 +839,7 @@ describe("PythTest", () => {
839
839
from : deployer . address ,
840
840
to : pythTest . address ,
841
841
success : false ,
842
- exitCode : 1034 , // ERROR_INVALID_GOVERNANCE_TARGET
842
+ exitCode : 2015 , // ERROR_INVALID_GOVERNANCE_TARGET
843
843
} ) ;
844
844
} ) ;
845
845
@@ -976,7 +976,7 @@ describe("PythTest", () => {
976
976
from : deployer . address ,
977
977
to : pythTest . address ,
978
978
success : false ,
979
- exitCode : 1037 , // ERROR_INVALID_CODE_HASH
979
+ exitCode : 2018 , // ERROR_INVALID_CODE_HASH
980
980
} ) ;
981
981
982
982
// Verify that the contract has not been upgraded by attempting to call the new method
0 commit comments