@@ -2491,7 +2491,7 @@ describe('Eth calls using MirrorNode', async function () {
24912491 } ) ;
24922492 restMock . onGet ( `contracts/${ contractAddress2 } ` ) . reply ( 200 , defaultContract2 ) ;
24932493
2494- sdkClientStub . submitContractCallQuery . returns ( {
2494+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
24952495 asBytes : function ( ) {
24962496 return Uint8Array . of ( 0 ) ;
24972497 }
@@ -2504,12 +2504,12 @@ describe('Eth calls using MirrorNode', async function () {
25042504 "data" : contractCallData ,
25052505 } , 'latest' ) ;
25062506
2507- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , 400_000 , accountAddress1 , 'eth_call' ) ;
2507+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , 400_000 , accountAddress1 , 'eth_call' ) ;
25082508 expect ( result ) . to . equal ( "0x00" ) ;
25092509 } ) ;
25102510
25112511 it ( 'eth_call with no data' , async function ( ) {
2512- sdkClientStub . submitContractCallQuery . returns ( {
2512+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
25132513 asBytes : function ( ) {
25142514 return Uint8Array . of ( 0 ) ;
25152515 }
@@ -2522,12 +2522,12 @@ describe('Eth calls using MirrorNode', async function () {
25222522 "gas" : maxGasLimitHex
25232523 } , 'latest' ) ;
25242524
2525- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , undefined , maxGasLimit , accountAddress1 , 'eth_call' ) ;
2525+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , undefined , maxGasLimit , accountAddress1 , 'eth_call' ) ;
25262526 expect ( result ) . to . equal ( "0x00" ) ;
25272527 } ) ;
25282528
25292529 it ( 'eth_call with no from address' , async function ( ) {
2530- sdkClientStub . submitContractCallQuery . returns ( {
2530+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
25312531 asBytes : function ( ) {
25322532 return Uint8Array . of ( 0 ) ;
25332533 }
@@ -2540,12 +2540,12 @@ describe('Eth calls using MirrorNode', async function () {
25402540 "gas" : maxGasLimitHex
25412541 } , 'latest' ) ;
25422542
2543- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , maxGasLimit , undefined , 'eth_call' ) ;
2543+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , maxGasLimit , undefined , 'eth_call' ) ;
25442544 expect ( result ) . to . equal ( "0x00" ) ;
25452545 } ) ;
25462546
25472547 it ( 'eth_call with all fields' , async function ( ) {
2548- sdkClientStub . submitContractCallQuery . returns ( {
2548+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
25492549 asBytes : function ( ) {
25502550 return Uint8Array . of ( 0 ) ;
25512551 }
@@ -2559,13 +2559,13 @@ describe('Eth calls using MirrorNode', async function () {
25592559 "gas" : maxGasLimitHex
25602560 } , 'latest' ) ;
25612561
2562- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , maxGasLimit , accountAddress1 , 'eth_call' ) ;
2562+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , maxGasLimit , accountAddress1 , 'eth_call' ) ;
25632563 expect ( result ) . to . equal ( "0x00" ) ;
25642564 } ) ;
25652565
25662566 //Return once the value, then it's being fetched from cache. After the loop we reset the sdkClientStub, so that it returns nothing, if we get an error in the next request that means that the cache was cleared.
25672567 it ( 'eth_call should cache the response for 200ms' , async function ( ) {
2568- sdkClientStub . submitContractCallQuery . returns ( {
2568+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
25692569 asBytes : function ( ) {
25702570 return Uint8Array . of ( 0 ) ;
25712571 }
@@ -2601,7 +2601,7 @@ describe('Eth calls using MirrorNode', async function () {
26012601
26022602 describe ( 'with gas > 15_000_000' , async function ( ) {
26032603 it ( 'caps gas at 15_000_000' , async function ( ) {
2604- sdkClientStub . submitContractCallQuery . returns ( {
2604+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
26052605 asBytes : function ( ) {
26062606 return Uint8Array . of ( 0 ) ;
26072607 }
@@ -2615,13 +2615,13 @@ describe('Eth calls using MirrorNode', async function () {
26152615 "gas" : 50_000_000
26162616 } , 'latest' ) ;
26172617
2618- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , 15_000_000 , accountAddress1 , 'eth_call' ) ;
2618+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , 15_000_000 , accountAddress1 , 'eth_call' ) ;
26192619 expect ( result ) . to . equal ( "0x00" ) ;
26202620 } ) ;
26212621 } ) ;
26222622
26232623 it ( 'SDK returns a precheck error' , async function ( ) {
2624- sdkClientStub . submitContractCallQuery . throws ( predefined . CONTRACT_REVERT ( defaultErrorMessage ) ) ;
2624+ sdkClientStub . submitContractCallQueryWithRetry . throws ( predefined . CONTRACT_REVERT ( defaultErrorMessage ) ) ;
26252625
26262626 const result = await ethImpl . call ( {
26272627 "from" : accountAddress1 ,
@@ -2754,7 +2754,7 @@ describe('Eth calls using MirrorNode', async function () {
27542754 }
27552755 } ) ;
27562756
2757- sdkClientStub . submitContractCallQuery . returns ( {
2757+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
27582758 asBytes : function ( ) {
27592759 return Uint8Array . of ( 0 ) ;
27602760 }
@@ -2763,7 +2763,7 @@ describe('Eth calls using MirrorNode', async function () {
27632763
27642764 const result = await ethImpl . call ( callData , 'latest' ) ;
27652765
2766- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , maxGasLimit , accountAddress1 , 'eth_call' ) ;
2766+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , maxGasLimit , accountAddress1 , 'eth_call' ) ;
27672767 expect ( result ) . to . equal ( "0x00" ) ;
27682768 } ) ;
27692769
0 commit comments