Skip to content

Commit b0ee1d1

Browse files
committed
Update integration tests after flow-emulation version bump
1 parent 366d28d commit b0ee1d1

6 files changed

+16
-16
lines changed

tests/web3js/config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ module.exports = {
55
web3: web3,
66
eoa: web3.eth.accounts.privateKeyToAccount('0xf6d5333177711e562cabf1f311916196ee6ffc2a07966d9d4628094073bd5442'), // eoa is 0xfacf71692421039876a5bb4f10ef7a439d8ef61e
77
fundedAmount: 5.0,
8-
startBlockHeight: 4n, // start block height after setup accounts
9-
coaDeploymentHeight: 3n, // block height where COA contract was deployed
8+
startBlockHeight: 3n, // start block height after setup accounts
9+
coaDeploymentHeight: 2n, // block height where COA contract was deployed
1010
coinbase: '0x658bdf435d810c91414ec09147daa6db62406379', // configured account to receive fees
1111
successStatus: 1n,
1212
minGasPrice: 150n

tests/web3js/debug_traces_test.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -287,15 +287,15 @@ it('should retrieve transaction traces', async () => {
287287
gasUsed: '0x6147',
288288
to: contractAddress.toLowerCase(),
289289
input: '0xc550f90f',
290-
output: '0x0000000000000000000000000000000000000000000000000000000000000007',
290+
output: '0x0000000000000000000000000000000000000000000000000000000000000006',
291291
calls: [
292292
{
293293
from: contractAddress.toLowerCase(),
294294
gas: '0x54e1',
295295
gasUsed: '0x2',
296296
to: '0x0000000000000000000000010000000000000001',
297297
input: '0x53e87d66',
298-
output: '0x0000000000000000000000000000000000000000000000000000000000000007',
298+
output: '0x0000000000000000000000000000000000000000000000000000000000000006',
299299
type: 'STATICCALL'
300300
}
301301
],
@@ -588,15 +588,15 @@ it('should retrieve call traces', async () => {
588588
gasUsed: '0xb38f',
589589
to: contractAddress.toLowerCase(),
590590
input: '0xc550f90f',
591-
output: '0x0000000000000000000000000000000000000000000000000000000000000008',
591+
output: '0x0000000000000000000000000000000000000000000000000000000000000007',
592592
calls: [
593593
{
594594
from: contractAddress.toLowerCase(),
595595
gas: '0x6d44',
596596
gasUsed: '0x524a',
597597
to: '0x0000000000000000000000010000000000000001',
598598
input: '0x53e87d66',
599-
output: '0x0000000000000000000000000000000000000000000000000000000000000008',
599+
output: '0x0000000000000000000000000000000000000000000000000000000000000007',
600600
type: 'STATICCALL'
601601
}
602602
],

tests/web3js/eth_filter_endpoints_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ describe('eth_getFilterChanges', async () => {
390390
assert.lengthOf(transactions, 2) // the last transaction is the COA transfer for gas fees
391391
let expectedTx = {
392392
blockHash: res.receipt.blockHash,
393-
blockNumber: '0xe',
393+
blockNumber: '0xd',
394394
from: '0xFACF71692421039876a5BB4F10EF7A439D8ef61E',
395395
gas: '0xf4240',
396396
gasPrice: '0x96',
@@ -410,7 +410,7 @@ describe('eth_getFilterChanges', async () => {
410410

411411
let expectedCoaTx = {
412412
blockHash: res.receipt.blockHash,
413-
blockNumber: '0xe',
413+
blockNumber: '0xd',
414414
from: '0x0000000000000000000000030000000000000000',
415415
gas: '0x5b04',
416416
gasPrice: '0x0',

tests/web3js/eth_logs_filtering_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ it('emit logs and retrieve them using different filters', async () => {
142142
'0x0000000000000000000000000000000000000000000000000000000000000190'
143143
],
144144
data: '0x000000000000000000000000000000000000000000000000000000000000019a',
145-
blockNumber: '0xb',
145+
blockNumber: '0xa',
146146
transactionHash: '0x0c2b2477ab81c9132c5c4fd4f50935bc5807fbf4cf3bf3b69173491b68d2ca8b',
147147
transactionIndex: '0x0',
148148
blockHash: latestBlock.hash,
@@ -178,7 +178,7 @@ it('emit logs and retrieve them using different filters', async () => {
178178
'0x0000000000000000000000000000000000000000000000000000000000000190'
179179
],
180180
data: '0x000000000000000000000000000000000000000000000000000000000000019a',
181-
blockNumber: '0xb',
181+
blockNumber: '0xa',
182182
transactionHash: '0x0c2b2477ab81c9132c5c4fd4f50935bc5807fbf4cf3bf3b69173491b68d2ca8b',
183183
transactionIndex: '0x0',
184184
blockHash: latestBlock.hash,

tests/web3js/eth_non_interactive_test.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ it('can make batch requests', async () => {
307307
jsonrpc: '2.0',
308308
id: 5,
309309
method: 'eth_getBlockTransactionCountByNumber',
310-
params: ['0x3'],
310+
params: ['0x2'],
311311
}
312312

313313
batch.add(getBlockNumber)
@@ -320,7 +320,7 @@ it('can make batch requests', async () => {
320320

321321
assert.deepEqual(
322322
results[0],
323-
{ jsonrpc: '2.0', id: 1, result: '0x4' }
323+
{ jsonrpc: '2.0', id: 1, result: '0x3' }
324324
)
325325
assert.deepEqual(
326326
results[1],
@@ -371,9 +371,9 @@ it('should get fee history', async () => {
371371
response,
372372
{
373373
oldestBlock: 1n,
374-
reward: [['0x96'], ['0x96'], ['0x96'], ['0x96']], // gas price is 150 during testing
375-
baseFeePerGas: [1n, 1n, 1n, 1n],
376-
gasUsedRatio: [0, 0, 0.006205458333333334, 0]
374+
reward: [['0x96'], ['0x96'], ['0x96']], // gas price is 150 during testing
375+
baseFeePerGas: [1n, 1n, 1n],
376+
gasUsedRatio: [0, 0.006205458333333334, 0]
377377
}
378378
)
379379
})

tests/web3js/verify_cadence_arch_calls_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ it('should be able to use Cadence Arch calls', async () => {
6464
res = await web3.eth.call({ to: contractAddress, data: flowBlockHeightData }, 'latest')
6565
assert.equal(
6666
web3.eth.abi.decodeParameter('uint64', res),
67-
8n,
67+
conf.startBlockHeight + 4n,
6868
)
6969

7070
// submit a transaction that calls verifyArchCallToVerifyCOAOwnershipProof(address,bytes32,bytes)

0 commit comments

Comments
 (0)