From 3e39ba8a1dfea52a9995ef1572671c4b3eb327d2 Mon Sep 17 00:00:00 2001 From: 0x00000002 Date: Fri, 5 Jul 2024 11:26:01 +1200 Subject: [PATCH] prettier Signed-off-by: 0x00000002 --- ts-tests/tests/test-fee-history.ts | 16 ++--- ts-tests/tests/test-gas.ts | 110 ++++++++++++++--------------- 2 files changed, 63 insertions(+), 63 deletions(-) diff --git a/ts-tests/tests/test-fee-history.ts b/ts-tests/tests/test-fee-history.ts index 02c9028124..77eecc5812 100644 --- a/ts-tests/tests/test-fee-history.ts +++ b/ts-tests/tests/test-fee-history.ts @@ -6,7 +6,7 @@ import { GENESIS_ACCOUNT, GENESIS_ACCOUNT_PRIVATE_KEY, CHAIN_ID } from "./config import { createAndFinalizeBlock, describeWithFrontier, customRequest } from "./util"; // We use ethers library in this test as apparently web3js's types are not fully EIP-1559 compliant yet. -describeWithFrontier("Frontier RPC (Fee History)", (context) => { +describeWithFrontier("Frontier RPC (Fee History)", context => { const TEST_CONTRACT_BYTECODE = "0x608060405234801561001057600080fd5b50610041337fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61004660201b60201c565b610291565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156100e9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6101028160025461020960201b610c7c1790919060201c565b60028190555061015d816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461020960201b610c7c1790919060201c565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600080828401905083811015610287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b610e3a806102a06000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a08231146101fd578063a457c2d714610255578063a9059cbb146102bb578063dd62ed3e1461032157610088565b8063095ea7b31461008d57806318160ddd146100f357806323b872dd146101115780633950935114610197575b600080fd5b6100d9600480360360408110156100a357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610399565b604051808215151515815260200191505060405180910390f35b6100fb6103b7565b6040518082815260200191505060405180910390f35b61017d6004803603606081101561012757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506103c1565b604051808215151515815260200191505060405180910390f35b6101e3600480360360408110156101ad57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061049a565b604051808215151515815260200191505060405180910390f35b61023f6004803603602081101561021357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061054d565b6040518082815260200191505060405180910390f35b6102a16004803603604081101561026b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610595565b604051808215151515815260200191505060405180910390f35b610307600480360360408110156102d157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610662565b604051808215151515815260200191505060405180910390f35b6103836004803603604081101561033757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610680565b6040518082815260200191505060405180910390f35b60006103ad6103a6610707565b848461070f565b6001905092915050565b6000600254905090565b60006103ce848484610906565b61048f846103da610707565b61048a85604051806060016040528060288152602001610d7060289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610440610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b61070f565b600190509392505050565b60006105436104a7610707565b8461053e85600160006104b8610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c7c90919063ffffffff16565b61070f565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006106586105a2610707565b8461065385604051806060016040528060258152602001610de160259139600160006105cc610707565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b61070f565b6001905092915050565b600061067661066f610707565b8484610906565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610795576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180610dbd6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561081b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610d286022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561098c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180610d986025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a12576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180610d056023913960400191505060405180910390fd5b610a7d81604051806060016040528060268152602001610d4a602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610bbc9092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b10816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610c7c90919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610c69576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c2e578082015181840152602081019050610c13565b50505050905090810190601f168015610c5b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015610cfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820c7a5ffabf642bda14700b2de42f8c57b36621af020441df825de45fd2b3e1c5c64736f6c63430005100032"; @@ -21,7 +21,7 @@ describeWithFrontier("Frontier RPC (Fee History)", (context) => { let nonce = 0; function getPercentile(percentile, array) { - array.sort(function (a, b) { + array.sort(function(a, b) { return a - b; }); let index = (percentile / 100) * array.length - 1; @@ -44,7 +44,7 @@ describeWithFrontier("Frontier RPC (Fee History)", (context) => { accessList: [], nonce: nonce, gasLimit: "0x100000", - chainId: CHAIN_ID, + chainId: CHAIN_ID }); nonce++; } @@ -52,18 +52,18 @@ describeWithFrontier("Frontier RPC (Fee History)", (context) => { } } - step("should return error on non-existent blocks", async function () { + step("should return error on non-existent blocks", async function() { this.timeout(100000); let result = customRequest(context.web3, "eth_feeHistory", ["0x0", "0x1", []]) .then(() => { return Promise.reject({ - message: "Execution succeeded but should have failed", + message: "Execution succeeded but should have failed" }); }) - .catch((err) => expect(err.message).to.equal("Error getting header at BlockId::Number(1)")); + .catch(err => expect(err.message).to.equal("Error getting header at BlockId::Number(1)")); }); - step("result length should match spec", async function () { + step("result length should match spec", async function() { this.timeout(100000); let blockCount = 2; let rewardPercentiles = [20, 50, 70]; @@ -83,7 +83,7 @@ describeWithFrontier("Frontier RPC (Fee History)", (context) => { } }); - step("should calculate percentiles", async function () { + step("should calculate percentiles", async function() { this.timeout(100000); let blockCount = 11; let rewardPercentiles = [20, 50, 70, 85, 100]; diff --git a/ts-tests/tests/test-gas.ts b/ts-tests/tests/test-gas.ts index 384803153c..e245e47bd1 100644 --- a/ts-tests/tests/test-gas.ts +++ b/ts-tests/tests/test-gas.ts @@ -13,7 +13,7 @@ import { FIRST_CONTRACT_ADDRESS, ETH_BLOCK_GAS_LIMIT, ETH_BLOCK_POV_LIMIT, - TEST_ERC20_BYTECODE, + TEST_ERC20_BYTECODE } from "./config"; import { describeWithFrontier, createAndFinalizeBlock, customRequest } from "./util"; @@ -47,13 +47,13 @@ function estimationVariance(binarySearchEstimation, oneOffEstimation) { return ((binarySearchEstimation - oneOffEstimation) * ESTIMATION_VARIANCE) / binarySearchEstimation; } -describeWithFrontier("Frontier RPC (Gas)", (context) => { +describeWithFrontier("Frontier RPC (Gas)", context => { const TEST_CONTRACT_ABI = Test.abi as AbiItem[]; // Those test are ordered. In general this should be avoided, but due to the time it takes // to spin up a frontier node, it saves a lot of time. - it("eth_estimateGas for contract creation", async function () { + it("eth_estimateGas for contract creation", async function() { // The value returned as an estimation by the evm with estimate mode ON. let oneOffEstimation = 196701; let binarySearchEstimation = binarySearch(oneOffEstimation); @@ -62,12 +62,12 @@ describeWithFrontier("Frontier RPC (Gas)", (context) => { expect( await context.web3.eth.estimateGas({ from: GENESIS_ACCOUNT, - data: Test.bytecode, - }), + data: Test.bytecode + }) ).to.equal(binarySearchEstimation); }); - it("eth_estimateGas for contract call", async function () { + it("eth_estimateGas for contract call", async function() { // The value returned as an estimation by the evm with estimate mode ON. let oneOffEstimation = 21204; let binarySearchEstimation = binarySearch(oneOffEstimation); @@ -75,26 +75,26 @@ describeWithFrontier("Frontier RPC (Gas)", (context) => { expect(estimationVariance(binarySearchEstimation, oneOffEstimation)).to.be.lessThan(1); const contract = new context.web3.eth.Contract(TEST_CONTRACT_ABI, FIRST_CONTRACT_ADDRESS, { from: GENESIS_ACCOUNT, - gasPrice: "0x3B9ACA00", + gasPrice: "0x3B9ACA00" }); expect(await contract.methods.multiply(3).estimateGas()).to.equal(binarySearchEstimation); }); - it("eth_estimateGas without gas_limit should pass", async function () { + it("eth_estimateGas without gas_limit should pass", async function() { // The value returned as an estimation by the evm with estimate mode ON. let oneOffEstimation = 21204; let binarySearchEstimation = binarySearch(oneOffEstimation); // Sanity check expect a variance of 10%. expect(estimationVariance(binarySearchEstimation, oneOffEstimation)).to.be.lessThan(1); const contract = new context.web3.eth.Contract(TEST_CONTRACT_ABI, FIRST_CONTRACT_ADDRESS, { - from: GENESIS_ACCOUNT, + from: GENESIS_ACCOUNT }); expect(await contract.methods.multiply(3).estimateGas()).to.equal(binarySearchEstimation); }); - it("eth_estimateGas should handle AccessList alias", async function () { + it("eth_estimateGas should handle AccessList alias", async function() { // The value returned as an estimation by the evm with estimate mode ON. // 4300 == 1900 for one key and 2400 for one storage. let oneOffEstimation = 196701 + 4300; @@ -109,68 +109,68 @@ describeWithFrontier("Frontier RPC (Gas)", (context) => { accessList: [ { address: "0x0000000000000000000000000000000000000000", - storageKeys: ["0x0000000000000000000000000000000000000000000000000000000000000000"], - }, - ], - }, + storageKeys: ["0x0000000000000000000000000000000000000000000000000000000000000000"] + } + ] + } ]) ).result; expect(result).to.equal(context.web3.utils.numberToHex(binarySearchEstimation)); }); - it("eth_estimateGas 0x0 gasPrice is equivalent to not setting one", async function () { + it("eth_estimateGas 0x0 gasPrice is equivalent to not setting one", async function() { let result = await context.web3.eth.estimateGas({ from: GENESIS_ACCOUNT, data: Test.bytecode, - gasPrice: "0x0", + gasPrice: "0x0" }); expect(result).to.equal(197732); result = await context.web3.eth.estimateGas({ from: GENESIS_ACCOUNT, - data: Test.bytecode, + data: Test.bytecode }); expect(result).to.equal(197732); }); - it("tx gas limit below ETH_BLOCK_GAS_LIMIT", async function () { + it("tx gas limit below ETH_BLOCK_GAS_LIMIT", async function() { const tx = await context.web3.eth.accounts.signTransaction( { from: GENESIS_ACCOUNT, data: Test.bytecode, gas: ETH_BLOCK_GAS_LIMIT - 1, - gasPrice: "0x3B9ACA00", + gasPrice: "0x3B9ACA00" }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); const createReceipt = await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); await createAndFinalizeBlock(context.web3); expect((createReceipt as any).transactionHash).to.be.not.null; expect((createReceipt as any).blockHash).to.be.not.null; }); - it("tx gas limit equal ETH_BLOCK_GAS_LIMIT", async function () { + it("tx gas limit equal ETH_BLOCK_GAS_LIMIT", async function() { const tx = await context.web3.eth.accounts.signTransaction( { from: GENESIS_ACCOUNT, data: Test.bytecode, gas: ETH_BLOCK_GAS_LIMIT, - gasPrice: "0x3B9ACA00", + gasPrice: "0x3B9ACA00" }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); const createReceipt = await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); await createAndFinalizeBlock(context.web3); expect((createReceipt as any).transactionHash).to.be.not.null; expect((createReceipt as any).blockHash).to.be.not.null; }); - it("tx gas limit larger ETH_BLOCK_GAS_LIMIT", async function () { + it("tx gas limit larger ETH_BLOCK_GAS_LIMIT", async function() { const tx = await context.web3.eth.accounts.signTransaction( { from: GENESIS_ACCOUNT, data: Test.bytecode, gas: ETH_BLOCK_GAS_LIMIT + 1, - gasPrice: "0x3B9ACA00", + gasPrice: "0x3B9ACA00" }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); const createReceipt = await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); await createAndFinalizeBlock(context.web3); @@ -178,7 +178,7 @@ describeWithFrontier("Frontier RPC (Gas)", (context) => { }); }); -describeWithFrontier("Frontier RPC (Gas limit Weightv2 ref time)", (context) => { +describeWithFrontier("Frontier RPC (Gas limit Weightv2 ref time)", context => { const STORAGE_LOOP_CONTRACT_BYTECODE = StorageLoop.bytecode; const STORAGE_LOOP_CONTRACT_ABI = StorageLoop.abi as AbiItem[]; @@ -195,27 +195,27 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 ref time)", (context) => // Number of transfers per available space left const TRANSFERS_PER_BLOCK = Math.floor(REMNANT / 21_000); - before("create the contract", async function () { + before("create the contract", async function() { const tx = await context.web3.eth.accounts.signTransaction( { from: GENESIS_ACCOUNT, data: STORAGE_LOOP_CONTRACT_BYTECODE, value: "0x00", gasPrice: "0x3B9ACA00", - gas: "0x100000", + gas: "0x100000" }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); await createAndFinalizeBlock(context.web3); }); - step("gas limit bound works with ref time heavy txns", async function () { + step("gas limit bound works with ref time heavy txns", async function() { this.timeout(10000); const contract = new context.web3.eth.Contract(STORAGE_LOOP_CONTRACT_ABI, FIRST_CONTRACT_ADDRESS, { from: GENESIS_ACCOUNT, - gasPrice: "0x3B9ACA00", + gasPrice: "0x3B9ACA00" }); let nonce = await context.web3.eth.getTransactionCount(GENESIS_ACCOUNT); @@ -229,9 +229,9 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 ref time)", (context) => data: data.encodeABI(), gasPrice: "0x3B9ACA00", gas: "0x100000", - nonce, + nonce }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); nonce++; @@ -246,9 +246,9 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 ref time)", (context) => value: "0x1", gasPrice: "0x3B9ACA00", gas: "0x5208", - nonce, + nonce }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); let r = await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); nonce++; @@ -263,7 +263,7 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 ref time)", (context) => }); }); -describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", (context) => { +describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", context => { const STORAGE_LOOP_CONTRACT_BYTECODE = StorageLoop.bytecode; const STORAGE_LOOP_CONTRACT_ABI = StorageLoop.abi as AbiItem[]; @@ -283,16 +283,16 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", (context) => const TRANSFERS_PER_BLOCK = Math.floor((REMNANT - CONTRACT_TRANSFER_EFFECTIVE_GAS) / 21_000); let contractAddress; - before("create the contract", async function () { + before("create the contract", async function() { const tx1 = await context.web3.eth.accounts.signTransaction( { from: GENESIS_ACCOUNT, data: STORAGE_LOOP_CONTRACT_BYTECODE, value: "0x00", gasPrice: "0x3B9ACA00", - gas: "0x100000", + gas: "0x100000" }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); await customRequest(context.web3, "eth_sendRawTransaction", [tx1.rawTransaction]); const tx2 = await context.web3.eth.accounts.signTransaction( @@ -301,9 +301,9 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", (context) => data: TEST_ERC20_BYTECODE, gas: "0x1000000", gasPrice: "0x3B9ACA00", - nonce: 1, + nonce: 1 }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); const { result } = await customRequest(context.web3, "eth_sendRawTransaction", [tx2.rawTransaction]); await createAndFinalizeBlock(context.web3); @@ -313,12 +313,12 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", (context) => // This test fills a block with regular transfers + a transfer to a contract with big bytecode. // We consider bytecode "big" when it consumes an effective gas greater than the legacy gas. - step("gas limit bound works with pov size heavy txns", async function () { + step("gas limit bound works with pov size heavy txns", async function() { this.timeout(10000); const contract = new context.web3.eth.Contract(STORAGE_LOOP_CONTRACT_ABI, FIRST_CONTRACT_ADDRESS, { from: GENESIS_ACCOUNT, - gasPrice: "0x3B9ACA00", + gasPrice: "0x3B9ACA00" }); let nonce = await context.web3.eth.getTransactionCount(GENESIS_ACCOUNT); @@ -329,9 +329,9 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", (context) => value: "0x1", gasPrice: "0x3B9ACA00", gas: "0xF4240", - nonce, + nonce }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); let contract_transfer_hash = await ( await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]) @@ -347,9 +347,9 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", (context) => data: data.encodeABI(), gasPrice: "0x3B9ACA00", gas: "0x100000", - nonce, + nonce }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); nonce++; @@ -364,9 +364,9 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", (context) => value: "0x1", gasPrice: "0x3B9ACA00", gas: "0x5208", - nonce, + nonce }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); let r = await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction]); nonce++; @@ -383,7 +383,7 @@ describeWithFrontier("Frontier RPC (Gas limit Weightv2 pov size)", (context) => }); }); -describeWithFrontier("Frontier RPC (Invalid opcode estimate gas)", (context) => { +describeWithFrontier("Frontier RPC (Invalid opcode estimate gas)", context => { const INVALID_OPCODE_BYTECODE = InvalidOpcode.bytecode; let contractAddess; @@ -394,20 +394,20 @@ describeWithFrontier("Frontier RPC (Invalid opcode estimate gas)", (context) => data: INVALID_OPCODE_BYTECODE, value: "0x00", gasPrice: "0x3B9ACA00", - gas: "0x100000", + gas: "0x100000" }, - GENESIS_ACCOUNT_PRIVATE_KEY, + GENESIS_ACCOUNT_PRIVATE_KEY ); const txHash = (await customRequest(context.web3, "eth_sendRawTransaction", [tx.rawTransaction])).result; await createAndFinalizeBlock(context.web3); contractAddess = (await context.web3.eth.getTransactionReceipt(txHash)).contractAddress; }); - it("should estimate gas with invalid opcode", async function () { + it("should estimate gas with invalid opcode", async function() { let estimate = await context.web3.eth.estimateGas({ from: GENESIS_ACCOUNT, to: contractAddess, - data: "0x28b5e32b", // selector for the contract's `call` method + data: "0x28b5e32b" // selector for the contract's `call` method }); // The actual estimated value is irrelevant for this test purposes, we just want to verify that // the binary search is not interrupted when an InvalidCode is returned by the evm.