From 7399a96731f57ddd83689591524d04507c5910a3 Mon Sep 17 00:00:00 2001 From: Oleksii Kosynskyi Date: Thu, 26 Oct 2023 11:32:55 -0400 Subject: [PATCH] add gasPrice. revert fixtures. --- packages/web3-eth/test/integration/rpc.test.ts | 2 ++ .../test/unit/eth_rpc_methods/fixtures/estimate_gas.ts | 1 + .../test/unit/eth_rpc_methods/fixtures/send_transaction.ts | 1 + .../test/unit/eth_rpc_methods/fixtures/sign_transaction.ts | 1 + packages/web3-types/src/apis/eth_execution_api.ts | 2 +- 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/web3-eth/test/integration/rpc.test.ts b/packages/web3-eth/test/integration/rpc.test.ts index 973faaacaab..c8d8d68d34a 100644 --- a/packages/web3-eth/test/integration/rpc.test.ts +++ b/packages/web3-eth/test/integration/rpc.test.ts @@ -289,6 +289,7 @@ describe('rpc', () => { expect(res0.v).toBeDefined(); expect(res0.data).toBeDefined(); expect(res0?.hash).toBe(receipt0.transactionHash); + expect(res0.gasPrice).toBeDefined(); const receipt1 = await web3Eth.sendTransaction({ @@ -344,6 +345,7 @@ describe('rpc', () => { expect(res2.maxFeePerGas).toBeDefined(); expect(res2.maxPriorityFeePerGas).toBeDefined(); expect(res2.accessList).toBeDefined(); + expect(res2.gasPrice).toBeDefined(); }); itIf(getSystemTestBackend() !== 'ganache')('getPendingTransactions', async () => { diff --git a/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/estimate_gas.ts b/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/estimate_gas.ts index 20768f0dcd9..62f547eaa8b 100644 --- a/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/estimate_gas.ts +++ b/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/estimate_gas.ts @@ -23,6 +23,7 @@ const transaction: Partial = { to: '0x3535353535353535353535353535353535353535', value: '0x174876e800', gas: '0x5208', + gasPrice: '0x4a817c800', type: '0x0', maxFeePerGas: '0x1229298c00', maxPriorityFeePerGas: '0x49504f80', diff --git a/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/send_transaction.ts b/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/send_transaction.ts index d68140c7ecf..936b846966b 100644 --- a/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/send_transaction.ts +++ b/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/send_transaction.ts @@ -23,6 +23,7 @@ const transaction: Partial = { to: '0x3535353535353535353535353535353535353535', value: '0x174876e800', gas: '0x5208', + gasPrice: '0x4a817c800', type: '0x0', maxFeePerGas: '0x1229298c00', maxPriorityFeePerGas: '0x49504f80', diff --git a/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/sign_transaction.ts b/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/sign_transaction.ts index d68140c7ecf..936b846966b 100644 --- a/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/sign_transaction.ts +++ b/packages/web3-rpc-methods/test/unit/eth_rpc_methods/fixtures/sign_transaction.ts @@ -23,6 +23,7 @@ const transaction: Partial = { to: '0x3535353535353535353535353535353535353535', value: '0x174876e800', gas: '0x5208', + gasPrice: '0x4a817c800', type: '0x0', maxFeePerGas: '0x1229298c00', maxPriorityFeePerGas: '0x49504f80', diff --git a/packages/web3-types/src/apis/eth_execution_api.ts b/packages/web3-types/src/apis/eth_execution_api.ts index d5416bbb49e..e015e6b9ed3 100644 --- a/packages/web3-types/src/apis/eth_execution_api.ts +++ b/packages/web3-types/src/apis/eth_execution_api.ts @@ -68,7 +68,7 @@ export interface Transaction1559UnsignedAPI extends BaseTransactionAPI { readonly maxFeePerGas: Uint; readonly maxPriorityFeePerGas: Uint; readonly accessList: AccessList; - readonly gasPrice?: never; + readonly gasPrice: Uint; } export interface Transaction1559SignedAPI extends Transaction1559UnsignedAPI {