@@ -2627,7 +2627,7 @@ describe('Eth calls using MirrorNode', async function () {
26272627 } ) ;
26282628 restMock . onGet ( `contracts/${ contractAddress2 } ` ) . reply ( 200 , defaultContract2 ) ;
26292629
2630- sdkClientStub . submitContractCallQuery . returns ( {
2630+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
26312631 asBytes : function ( ) {
26322632 return Uint8Array . of ( 0 ) ;
26332633 }
@@ -2640,12 +2640,12 @@ describe('Eth calls using MirrorNode', async function () {
26402640 "data" : contractCallData ,
26412641 } , 'latest' ) ;
26422642
2643- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , 400_000 , accountAddress1 , 'eth_call' ) ;
2643+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , 400_000 , accountAddress1 , 'eth_call' ) ;
26442644 expect ( result ) . to . equal ( "0x00" ) ;
26452645 } ) ;
26462646
26472647 it ( 'eth_call with no data' , async function ( ) {
2648- sdkClientStub . submitContractCallQuery . returns ( {
2648+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
26492649 asBytes : function ( ) {
26502650 return Uint8Array . of ( 0 ) ;
26512651 }
@@ -2658,12 +2658,12 @@ describe('Eth calls using MirrorNode', async function () {
26582658 "gas" : maxGasLimitHex
26592659 } , 'latest' ) ;
26602660
2661- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , undefined , maxGasLimit , accountAddress1 , 'eth_call' ) ;
2661+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , undefined , maxGasLimit , accountAddress1 , 'eth_call' ) ;
26622662 expect ( result ) . to . equal ( "0x00" ) ;
26632663 } ) ;
26642664
26652665 it ( 'eth_call with no from address' , async function ( ) {
2666- sdkClientStub . submitContractCallQuery . returns ( {
2666+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
26672667 asBytes : function ( ) {
26682668 return Uint8Array . of ( 0 ) ;
26692669 }
@@ -2676,12 +2676,12 @@ describe('Eth calls using MirrorNode', async function () {
26762676 "gas" : maxGasLimitHex
26772677 } , 'latest' ) ;
26782678
2679- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , maxGasLimit , undefined , 'eth_call' ) ;
2679+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , maxGasLimit , undefined , 'eth_call' ) ;
26802680 expect ( result ) . to . equal ( "0x00" ) ;
26812681 } ) ;
26822682
26832683 it ( 'eth_call with all fields' , async function ( ) {
2684- sdkClientStub . submitContractCallQuery . returns ( {
2684+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
26852685 asBytes : function ( ) {
26862686 return Uint8Array . of ( 0 ) ;
26872687 }
@@ -2695,13 +2695,13 @@ describe('Eth calls using MirrorNode', async function () {
26952695 "gas" : maxGasLimitHex
26962696 } , 'latest' ) ;
26972697
2698- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , maxGasLimit , accountAddress1 , 'eth_call' ) ;
2698+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , maxGasLimit , accountAddress1 , 'eth_call' ) ;
26992699 expect ( result ) . to . equal ( "0x00" ) ;
27002700 } ) ;
27012701
27022702 //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.
27032703 it ( 'eth_call should cache the response for 200ms' , async function ( ) {
2704- sdkClientStub . submitContractCallQuery . returns ( {
2704+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
27052705 asBytes : function ( ) {
27062706 return Uint8Array . of ( 0 ) ;
27072707 }
@@ -2737,7 +2737,7 @@ describe('Eth calls using MirrorNode', async function () {
27372737
27382738 describe ( 'with gas > 15_000_000' , async function ( ) {
27392739 it ( 'caps gas at 15_000_000' , async function ( ) {
2740- sdkClientStub . submitContractCallQuery . returns ( {
2740+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
27412741 asBytes : function ( ) {
27422742 return Uint8Array . of ( 0 ) ;
27432743 }
@@ -2751,13 +2751,13 @@ describe('Eth calls using MirrorNode', async function () {
27512751 "gas" : 50_000_000
27522752 } , 'latest' ) ;
27532753
2754- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , 15_000_000 , accountAddress1 , 'eth_call' ) ;
2754+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , 15_000_000 , accountAddress1 , 'eth_call' ) ;
27552755 expect ( result ) . to . equal ( "0x00" ) ;
27562756 } ) ;
27572757 } ) ;
27582758
27592759 it ( 'SDK returns a precheck error' , async function ( ) {
2760- sdkClientStub . submitContractCallQuery . throws ( predefined . CONTRACT_REVERT ( defaultErrorMessage ) ) ;
2760+ sdkClientStub . submitContractCallQueryWithRetry . throws ( predefined . CONTRACT_REVERT ( defaultErrorMessage ) ) ;
27612761
27622762 const result = await ethImpl . call ( {
27632763 "from" : accountAddress1 ,
@@ -2890,7 +2890,7 @@ describe('Eth calls using MirrorNode', async function () {
28902890 }
28912891 } ) ;
28922892
2893- sdkClientStub . submitContractCallQuery . returns ( {
2893+ sdkClientStub . submitContractCallQueryWithRetry . returns ( {
28942894 asBytes : function ( ) {
28952895 return Uint8Array . of ( 0 ) ;
28962896 }
@@ -2899,7 +2899,7 @@ describe('Eth calls using MirrorNode', async function () {
28992899
29002900 const result = await ethImpl . call ( callData , 'latest' ) ;
29012901
2902- sinon . assert . calledWith ( sdkClientStub . submitContractCallQuery , contractAddress2 , contractCallData , maxGasLimit , accountAddress1 , 'eth_call' ) ;
2902+ sinon . assert . calledWith ( sdkClientStub . submitContractCallQueryWithRetry , contractAddress2 , contractCallData , maxGasLimit , accountAddress1 , 'eth_call' ) ;
29032903 expect ( result ) . to . equal ( "0x00" ) ;
29042904 } ) ;
29052905
0 commit comments