Skip to content

Commit

Permalink
Update integration tests after flow-emulation version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
m-Peter committed Feb 4, 2025
1 parent 366d28d commit b0ee1d1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions tests/web3js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions tests/web3js/debug_traces_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,15 @@ it('should retrieve transaction traces', async () => {
gasUsed: '0x6147',
to: contractAddress.toLowerCase(),
input: '0xc550f90f',
output: '0x0000000000000000000000000000000000000000000000000000000000000007',
output: '0x0000000000000000000000000000000000000000000000000000000000000006',
calls: [
{
from: contractAddress.toLowerCase(),
gas: '0x54e1',
gasUsed: '0x2',
to: '0x0000000000000000000000010000000000000001',
input: '0x53e87d66',
output: '0x0000000000000000000000000000000000000000000000000000000000000007',
output: '0x0000000000000000000000000000000000000000000000000000000000000006',
type: 'STATICCALL'
}
],
Expand Down Expand Up @@ -588,15 +588,15 @@ it('should retrieve call traces', async () => {
gasUsed: '0xb38f',
to: contractAddress.toLowerCase(),
input: '0xc550f90f',
output: '0x0000000000000000000000000000000000000000000000000000000000000008',
output: '0x0000000000000000000000000000000000000000000000000000000000000007',
calls: [
{
from: contractAddress.toLowerCase(),
gas: '0x6d44',
gasUsed: '0x524a',
to: '0x0000000000000000000000010000000000000001',
input: '0x53e87d66',
output: '0x0000000000000000000000000000000000000000000000000000000000000008',
output: '0x0000000000000000000000000000000000000000000000000000000000000007',
type: 'STATICCALL'
}
],
Expand Down
4 changes: 2 additions & 2 deletions tests/web3js/eth_filter_endpoints_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -410,7 +410,7 @@ describe('eth_getFilterChanges', async () => {

let expectedCoaTx = {
blockHash: res.receipt.blockHash,
blockNumber: '0xe',
blockNumber: '0xd',
from: '0x0000000000000000000000030000000000000000',
gas: '0x5b04',
gasPrice: '0x0',
Expand Down
4 changes: 2 additions & 2 deletions tests/web3js/eth_logs_filtering_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 5 additions & 5 deletions tests/web3js/eth_non_interactive_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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],
Expand Down Expand Up @@ -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]
}
)
})
2 changes: 1 addition & 1 deletion tests/web3js/verify_cadence_arch_calls_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b0ee1d1

Please sign in to comment.