From b0ee1d118c6955a9fff847a5ab6327ffb9c96e16 Mon Sep 17 00:00:00 2001 From: Ardit Marku Date: Tue, 4 Feb 2025 11:42:58 +0200 Subject: [PATCH] Update integration tests after flow-emulation version bump --- tests/web3js/config.js | 4 ++-- tests/web3js/debug_traces_test.js | 8 ++++---- tests/web3js/eth_filter_endpoints_test.js | 4 ++-- tests/web3js/eth_logs_filtering_test.js | 4 ++-- tests/web3js/eth_non_interactive_test.js | 10 +++++----- tests/web3js/verify_cadence_arch_calls_test.js | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/web3js/config.js b/tests/web3js/config.js index e40d57f59..c23c2df85 100644 --- a/tests/web3js/config.js +++ b/tests/web3js/config.js @@ -5,8 +5,8 @@ module.exports = { web3: web3, eoa: web3.eth.accounts.privateKeyToAccount('0xf6d5333177711e562cabf1f311916196ee6ffc2a07966d9d4628094073bd5442'), // eoa is 0xfacf71692421039876a5bb4f10ef7a439d8ef61e fundedAmount: 5.0, - startBlockHeight: 4n, // start block height after setup accounts - coaDeploymentHeight: 3n, // block height where COA contract was deployed + startBlockHeight: 3n, // start block height after setup accounts + coaDeploymentHeight: 2n, // block height where COA contract was deployed coinbase: '0x658bdf435d810c91414ec09147daa6db62406379', // configured account to receive fees successStatus: 1n, minGasPrice: 150n diff --git a/tests/web3js/debug_traces_test.js b/tests/web3js/debug_traces_test.js index 30420ee52..820fd8e9e 100644 --- a/tests/web3js/debug_traces_test.js +++ b/tests/web3js/debug_traces_test.js @@ -287,7 +287,7 @@ it('should retrieve transaction traces', async () => { gasUsed: '0x6147', to: contractAddress.toLowerCase(), input: '0xc550f90f', - output: '0x0000000000000000000000000000000000000000000000000000000000000007', + output: '0x0000000000000000000000000000000000000000000000000000000000000006', calls: [ { from: contractAddress.toLowerCase(), @@ -295,7 +295,7 @@ it('should retrieve transaction traces', async () => { gasUsed: '0x2', to: '0x0000000000000000000000010000000000000001', input: '0x53e87d66', - output: '0x0000000000000000000000000000000000000000000000000000000000000007', + output: '0x0000000000000000000000000000000000000000000000000000000000000006', type: 'STATICCALL' } ], @@ -588,7 +588,7 @@ it('should retrieve call traces', async () => { gasUsed: '0xb38f', to: contractAddress.toLowerCase(), input: '0xc550f90f', - output: '0x0000000000000000000000000000000000000000000000000000000000000008', + output: '0x0000000000000000000000000000000000000000000000000000000000000007', calls: [ { from: contractAddress.toLowerCase(), @@ -596,7 +596,7 @@ it('should retrieve call traces', async () => { gasUsed: '0x524a', to: '0x0000000000000000000000010000000000000001', input: '0x53e87d66', - output: '0x0000000000000000000000000000000000000000000000000000000000000008', + output: '0x0000000000000000000000000000000000000000000000000000000000000007', type: 'STATICCALL' } ], diff --git a/tests/web3js/eth_filter_endpoints_test.js b/tests/web3js/eth_filter_endpoints_test.js index b83d5a4a9..19b70db58 100644 --- a/tests/web3js/eth_filter_endpoints_test.js +++ b/tests/web3js/eth_filter_endpoints_test.js @@ -390,7 +390,7 @@ describe('eth_getFilterChanges', async () => { assert.lengthOf(transactions, 2) // the last transaction is the COA transfer for gas fees let expectedTx = { blockHash: res.receipt.blockHash, - blockNumber: '0xe', + blockNumber: '0xd', from: '0xFACF71692421039876a5BB4F10EF7A439D8ef61E', gas: '0xf4240', gasPrice: '0x96', @@ -410,7 +410,7 @@ describe('eth_getFilterChanges', async () => { let expectedCoaTx = { blockHash: res.receipt.blockHash, - blockNumber: '0xe', + blockNumber: '0xd', from: '0x0000000000000000000000030000000000000000', gas: '0x5b04', gasPrice: '0x0', diff --git a/tests/web3js/eth_logs_filtering_test.js b/tests/web3js/eth_logs_filtering_test.js index d122e773e..7b798b2d7 100644 --- a/tests/web3js/eth_logs_filtering_test.js +++ b/tests/web3js/eth_logs_filtering_test.js @@ -142,7 +142,7 @@ it('emit logs and retrieve them using different filters', async () => { '0x0000000000000000000000000000000000000000000000000000000000000190' ], data: '0x000000000000000000000000000000000000000000000000000000000000019a', - blockNumber: '0xb', + blockNumber: '0xa', transactionHash: '0x0c2b2477ab81c9132c5c4fd4f50935bc5807fbf4cf3bf3b69173491b68d2ca8b', transactionIndex: '0x0', blockHash: latestBlock.hash, @@ -178,7 +178,7 @@ it('emit logs and retrieve them using different filters', async () => { '0x0000000000000000000000000000000000000000000000000000000000000190' ], data: '0x000000000000000000000000000000000000000000000000000000000000019a', - blockNumber: '0xb', + blockNumber: '0xa', transactionHash: '0x0c2b2477ab81c9132c5c4fd4f50935bc5807fbf4cf3bf3b69173491b68d2ca8b', transactionIndex: '0x0', blockHash: latestBlock.hash, diff --git a/tests/web3js/eth_non_interactive_test.js b/tests/web3js/eth_non_interactive_test.js index 888863292..e08721e8c 100644 --- a/tests/web3js/eth_non_interactive_test.js +++ b/tests/web3js/eth_non_interactive_test.js @@ -307,7 +307,7 @@ it('can make batch requests', async () => { jsonrpc: '2.0', id: 5, method: 'eth_getBlockTransactionCountByNumber', - params: ['0x3'], + params: ['0x2'], } batch.add(getBlockNumber) @@ -320,7 +320,7 @@ it('can make batch requests', async () => { assert.deepEqual( results[0], - { jsonrpc: '2.0', id: 1, result: '0x4' } + { jsonrpc: '2.0', id: 1, result: '0x3' } ) assert.deepEqual( results[1], @@ -371,9 +371,9 @@ it('should get fee history', async () => { response, { oldestBlock: 1n, - reward: [['0x96'], ['0x96'], ['0x96'], ['0x96']], // gas price is 150 during testing - baseFeePerGas: [1n, 1n, 1n, 1n], - gasUsedRatio: [0, 0, 0.006205458333333334, 0] + reward: [['0x96'], ['0x96'], ['0x96']], // gas price is 150 during testing + baseFeePerGas: [1n, 1n, 1n], + gasUsedRatio: [0, 0.006205458333333334, 0] } ) }) diff --git a/tests/web3js/verify_cadence_arch_calls_test.js b/tests/web3js/verify_cadence_arch_calls_test.js index 4d247aaff..21b17a94f 100644 --- a/tests/web3js/verify_cadence_arch_calls_test.js +++ b/tests/web3js/verify_cadence_arch_calls_test.js @@ -64,7 +64,7 @@ it('should be able to use Cadence Arch calls', async () => { res = await web3.eth.call({ to: contractAddress, data: flowBlockHeightData }, 'latest') assert.equal( web3.eth.abi.decodeParameter('uint64', res), - 8n, + conf.startBlockHeight + 4n, ) // submit a transaction that calls verifyArchCallToVerifyCOAOwnershipProof(address,bytes32,bytes)