@@ -181,7 +181,7 @@ describe("PythTest", () => {
181181
182182 await expect (
183183 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
185185 } ) ;
186186
187187 it ( "should correctly get ema price no older than" , async ( ) => {
@@ -210,7 +210,7 @@ describe("PythTest", () => {
210210
211211 await expect (
212212 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
214214 } ) ;
215215
216216 it ( "should correctly get ema price unsafe" , async ( ) => {
@@ -245,8 +245,8 @@ describe("PythTest", () => {
245245 expect ( initialBtcPrice . price ) . not . toBe ( HERMES_BTC_PRICE ) ;
246246 // Expect an error for ETH price feed as it doesn't exist initially
247247 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
250250
251251 const updateData = Buffer . from ( HERMES_BTC_ETH_UPDATE , "hex" ) ;
252252 const updateFee = await pythTest . getUpdateFee ( updateData ) ;
@@ -280,8 +280,8 @@ describe("PythTest", () => {
280280 const invalidUpdateData = Buffer . from ( "invalid data" ) ;
281281
282282 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
285285 } ) ;
286286
287287 it ( "should fail to update price feeds with invalid data" , async ( ) => {
@@ -303,7 +303,7 @@ describe("PythTest", () => {
303303 from : deployer . address ,
304304 to : pythTest . address ,
305305 success : false ,
306- exitCode : 1021 , // ERROR_INVALID_MAGIC
306+ exitCode : 2002 , // ERROR_INVALID_MAGIC
307307 } ) ;
308308 } ) ;
309309
@@ -352,7 +352,7 @@ describe("PythTest", () => {
352352 from : deployer . address ,
353353 to : pythTest . address ,
354354 success : false ,
355- exitCode : 1024 , // ERROR_UPDATE_DATA_SOURCE_NOT_FOUND
355+ exitCode : 2005 , // ERROR_UPDATE_DATA_SOURCE_NOT_FOUND
356356 } ) ;
357357 } ) ;
358358
@@ -368,7 +368,7 @@ describe("PythTest", () => {
368368
369369 await expect (
370370 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
372372 } ) ;
373373
374374 it ( "should fail to update price feeds with insufficient gas" , async ( ) => {
@@ -387,7 +387,7 @@ describe("PythTest", () => {
387387 from : deployer . address ,
388388 to : pythTest . address ,
389389 success : false ,
390- exitCode : 1038 , // ERROR_INSUFFICIENT_GAS
390+ exitCode : 3000 , // ERROR_INSUFFICIENT_GAS
391391 } ) ;
392392 } ) ;
393393
@@ -413,7 +413,7 @@ describe("PythTest", () => {
413413 from : deployer . address ,
414414 to : pythTest . address ,
415415 success : false ,
416- exitCode : 1030 , // ERROR_INSUFFICIENT_FEE = 1030
416+ exitCode : 2011 , // ERROR_INSUFFICIENT_FEE = 2011
417417 } ) ;
418418 } ) ;
419419
@@ -425,15 +425,15 @@ describe("PythTest", () => {
425425
426426 await expect (
427427 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
429429
430430 await expect (
431431 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
433433
434434 await expect (
435435 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
437437 } ) ;
438438
439439 it ( "should correctly get chain ID" , async ( ) => {
@@ -735,7 +735,7 @@ describe("PythTest", () => {
735735 from : deployer . address ,
736736 to : pythTest . address ,
737737 success : false ,
738- exitCode : 1012 , // ERROR_INVALID_GOVERNANCE_ACTION = 1012
738+ exitCode : 1012 , // ERROR_INVALID_GOVERNANCE_ACTION
739739 } ) ;
740740
741741 // Verify that the governance data source index hasn't changed
@@ -773,7 +773,7 @@ describe("PythTest", () => {
773773 from : deployer . address ,
774774 to : pythTest . address ,
775775 success : false ,
776- exitCode : 1032 , // ERROR_INVALID_GOVERNANCE_DATA_SOURCE
776+ exitCode : 2013 , // ERROR_INVALID_GOVERNANCE_DATA_SOURCE
777777 } ) ;
778778 } ) ;
779779
@@ -809,7 +809,7 @@ describe("PythTest", () => {
809809 from : deployer . address ,
810810 to : pythTest . address ,
811811 success : false ,
812- exitCode : 1033 , // ERROR_OLD_GOVERNANCE_MESSAGE
812+ exitCode : 2014 , // ERROR_OLD_GOVERNANCE_MESSAGE
813813 } ) ;
814814 } ) ;
815815
@@ -839,7 +839,7 @@ describe("PythTest", () => {
839839 from : deployer . address ,
840840 to : pythTest . address ,
841841 success : false ,
842- exitCode : 1034 , // ERROR_INVALID_GOVERNANCE_TARGET
842+ exitCode : 2015 , // ERROR_INVALID_GOVERNANCE_TARGET
843843 } ) ;
844844 } ) ;
845845
@@ -976,7 +976,7 @@ describe("PythTest", () => {
976976 from : deployer . address ,
977977 to : pythTest . address ,
978978 success : false ,
979- exitCode : 1037 , // ERROR_INVALID_CODE_HASH
979+ exitCode : 2018 , // ERROR_INVALID_CODE_HASH
980980 } ) ;
981981
982982 // Verify that the contract has not been upgraded by attempting to call the new method
0 commit comments