From 70c4560744dafa10e5f2e86203af3939e1918f75 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Wed, 15 Sep 2021 22:03:26 -1000 Subject: [PATCH 01/15] Init web3.eth.createAccessList --- packages/web3-eth/src/index.js | 6 +++++ test/eth.createAccessList.js | 49 ++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 test/eth.createAccessList.js diff --git a/packages/web3-eth/src/index.js b/packages/web3-eth/src/index.js index b503e10c3e3..f60cac85ede 100644 --- a/packages/web3-eth/src/index.js +++ b/packages/web3-eth/src/index.js @@ -565,6 +565,12 @@ var Eth = function Eth() { params: 0, outputFormatter: formatter.outputTransactionFormatter }), + new Method({ + name: 'createAccessList', + call: 'eth_createAccessList', + params: 2, + inputFormatter: [formatter.inputTransactionFormatter, formatter.inputDefaultBlockNumberFormatter], + }), // subscriptions new Subscriptions({ diff --git a/test/eth.createAccessList.js b/test/eth.createAccessList.js new file mode 100644 index 00000000000..8cc3be926c0 --- /dev/null +++ b/test/eth.createAccessList.js @@ -0,0 +1,49 @@ +var testMethod = require('./helpers/test.method.js'); + +var method = 'createAccessList'; + +var tests = [{ + args: [{ + from: '0x3bc5885c2941c5cda454bdb4a8c88aa7f248e312', + data: '0x20965255', + gasPrice: '0x3b9aca00', + gas: '0x3d0900', + to: '0x00f5f5f3a25f142fafd0af24a754fafa340f32c7' + }], + formattedArgs: [ + { + from: '0x3bc5885c2941c5cda454bdb4a8c88aa7f248e312', + data: '0x20965255', + gasPrice: '0x3b9aca00', + gas: '0x3d0900', + to: '0x00f5f5f3a25f142fafd0af24a754fafa340f32c7' + }, + 'latest' + ], + result: { + "accessList": [ + { + "address": "0x00f5f5f3a25f142fafd0af24a754fafa340f32c7", + "storageKeys": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] + } + ], + "gasUsed": "0x644e" + }, + formattedResult: { + "accessList": [ + { + "address": "0x00f5f5f3a25f142fafd0af24a754fafa340f32c7", + "storageKeys": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] + } + ], + "gasUsed": "0x644e" + }, + call: 'eth_'+ method +}]; + +testMethod.runTests('eth', method, tests); + From e0f7d3e26e6166f3c1047d8c42f6b2bb948b7393 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Wed, 15 Sep 2021 22:03:50 -1000 Subject: [PATCH 02/15] Init e2e test for createAccessList --- test/e2e.eth.createAccessList.js | 70 ++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 test/e2e.eth.createAccessList.js diff --git a/test/e2e.eth.createAccessList.js b/test/e2e.eth.createAccessList.js new file mode 100644 index 00000000000..3ac2c9ef1da --- /dev/null +++ b/test/e2e.eth.createAccessList.js @@ -0,0 +1,70 @@ +var assert = require('assert'); +var Basic = require('./sources/Basic'); +var Misc = require('./sources/Misc'); +var utils = require('./helpers/test.utils'); +var Web3 = utils.getWeb3(); + +describe('method.call [ @E2E ]', function () { + var web3; + var accounts; + var basic; + var instance; + var options; + + var basicOptions = { + data: Basic.bytecode, + gasPrice: 1000000000, // Default gasPrice set by Geth + gas: 4000000 + }; + + var miscOptions = { + data: Misc.bytecode, + gasPrice: 1000000000, // Default gasPrice set by Geth + gas: 4000000 + }; + + describe('http', function () { + before(async function () { + web3 = new Web3('http://localhost:8545'); + accounts = await web3.eth.getAccounts(); + + basic = new web3.eth.Contract(Basic.abi, basicOptions); + instance = await basic.deploy().send({from: accounts[0]}); + }) + + it('returns expected access list for getValue', async function () { + var expected = { + accessList: [ + { + address: '0x61ecff5d2eb87dfc4e8517004349ad90d5ba82da', + storageKeys: ["0x0000000000000000000000000000000000000000000000000000000000000000"] + } + ], + gasUsed: '0x644e' + }; + + assert.equal( + await instance.methods.getValue().createAccessList({from: accounts[0]}), + expected + ); + }); + + it('returns expected access list for setValue', async function () { + var expected = { + accessList: [ + { + address: '0x62c5ea3d7b34f67fced4923b531fc21d674e6fc3', + storageKeys: ["0x0000000000000000000000000000000000000000000000000000000000000000"] + } + ], + gasUsed: '0xb2f5' + } + + + assert.equal( + await instance.methods.setValue(1).createAccessList({from: accounts[0]}), + expected + ); + }); + }); +}); From fa8914499537c81c26565e4626a83a28d8027a77 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Wed, 15 Sep 2021 22:04:17 -1000 Subject: [PATCH 03/15] Add createAccessList method to method wrappers for contracts --- packages/web3-eth-contract/src/index.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/web3-eth-contract/src/index.js b/packages/web3-eth-contract/src/index.js index e597eef7b39..68e346c193c 100644 --- a/packages/web3-eth-contract/src/index.js +++ b/packages/web3-eth-contract/src/index.js @@ -806,6 +806,7 @@ Contract.prototype._createTxObject = function _createTxObject(){ txObject.send.request = this.parent._executeMethod.bind(txObject, 'send', true); // to make batch requests txObject.encodeABI = this.parent._encodeMethodABI.bind(txObject); txObject.estimateGas = this.parent._executeMethod.bind(txObject, 'estimate'); + txObject.createAccessList = this.parent._executeMethod.bind(txObject, 'createAccessList'); if (args && this.method.inputs && args.length !== this.method.inputs.length) { if (this.nextMethod) { @@ -903,6 +904,26 @@ Contract.prototype._executeMethod = function _executeMethod(){ } switch (args.type) { + case 'createAccessList': + + // return error, if no "from" is specified + if(!utils.isAddress(args.options.from)) { + return utils._fireError(errors.ContractNoFromAddressDefinedError(), defer.eventEmitter, defer.reject, args.callback); + } + + var createAccessList = (new Method({ + name: 'createAccessList', + call: 'eth_createAccessList', + params: 2, + inputFormatter: [formatters.inputTransactionFormatter, formatters.inputDefaultBlockNumberFormatter], + requestManager: _this._parent._requestManager, + accounts: ethAccounts, // is eth.accounts (necessary for wallet signing) + defaultAccount: _this._parent.defaultAccount, + defaultBlock: _this._parent.defaultBlock + })).createFunction(); + + return createAccessList(args.options, args.callback); + case 'estimate': var estimateGas = (new Method({ From fcc0a3f1d12defb8cf38fa9b0411bc56e6baaf9d Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 10:05:25 -1000 Subject: [PATCH 04/15] Update failing tests to use dynamic address --- test/e2e.eth.createAccessList.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e.eth.createAccessList.js b/test/e2e.eth.createAccessList.js index 3ac2c9ef1da..fb7d6da8185 100644 --- a/test/e2e.eth.createAccessList.js +++ b/test/e2e.eth.createAccessList.js @@ -36,14 +36,14 @@ describe('method.call [ @E2E ]', function () { var expected = { accessList: [ { - address: '0x61ecff5d2eb87dfc4e8517004349ad90d5ba82da', + address: instance.options.address.toLowerCase(), storageKeys: ["0x0000000000000000000000000000000000000000000000000000000000000000"] } ], gasUsed: '0x644e' }; - assert.equal( + assert.deepEqual( await instance.methods.getValue().createAccessList({from: accounts[0]}), expected ); @@ -53,7 +53,7 @@ describe('method.call [ @E2E ]', function () { var expected = { accessList: [ { - address: '0x62c5ea3d7b34f67fced4923b531fc21d674e6fc3', + address: instance.options.address.toLowerCase(), storageKeys: ["0x0000000000000000000000000000000000000000000000000000000000000000"] } ], @@ -61,7 +61,7 @@ describe('method.call [ @E2E ]', function () { } - assert.equal( + assert.deepEqual( await instance.methods.setValue(1).createAccessList({from: accounts[0]}), expected ); From 8cbb6e95153972bcffccab8a572fed9ecbada913 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 10:12:57 -1000 Subject: [PATCH 05/15] Add check to not run tests if ENV not Geth --- test/e2e.eth.createAccessList.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/e2e.eth.createAccessList.js b/test/e2e.eth.createAccessList.js index fb7d6da8185..0a329d8b7aa 100644 --- a/test/e2e.eth.createAccessList.js +++ b/test/e2e.eth.createAccessList.js @@ -33,6 +33,9 @@ describe('method.call [ @E2E ]', function () { }) it('returns expected access list for getValue', async function () { + // Currently only Geth supports eth_createAccessList + if (process.env.GANACHE || global.window ) return + var expected = { accessList: [ { @@ -50,6 +53,9 @@ describe('method.call [ @E2E ]', function () { }); it('returns expected access list for setValue', async function () { + // Currently only Geth supports eth_createAccessList + if (process.env.GANACHE || global.window ) return + var expected = { accessList: [ { From d4ac577d2502fc8db10a30947e7a7368584e2eda Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 14:51:56 -1000 Subject: [PATCH 06/15] Add createAccessList to docs --- docs/web3-eth-contract.rst | 71 +++++++++++++++++++++++++++++++++++++- docs/web3-eth.rst | 59 +++++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+), 1 deletion(-) diff --git a/docs/web3-eth-contract.rst b/docs/web3-eth-contract.rst index ebf176ac9bc..3f7f8286035 100644 --- a/docs/web3-eth-contract.rst +++ b/docs/web3-eth-contract.rst @@ -592,6 +592,7 @@ Returns - ``Function`` - :ref:`send `: Will deploy the contract. The promise will resolve with the new contract instance, instead of the receipt! - ``Function`` - :ref:`estimateGas `: Will estimate the gas used for deploying. Note: You must specify a ``from`` address otherwise you may experience odd behavior. - ``Function`` - :ref:`encodeABI `: Encodes the ABI of the deployment, which is contract data + constructor parameters +- ``Function`` - :ref:`createAccessList `: Returns an EIP-2930 access list for specified contract method Note: You must specify a ``from`` address and possible ``gas`` ------- Example @@ -663,7 +664,7 @@ methods myContract.methods.myMethod([param1[, param2[, ...]]]) -Creates a transaction object for that method, which then can be :ref:`called `, :ref:`send `, :ref:`estimated `, or :ref:`ABI encoded `. +Creates a transaction object for that method, which then can be :ref:`called `, :ref:`send `, :ref:`estimated `, :ref:`estimated ` , or :ref:`ABI encoded `. The methods of this smart contract are available through: @@ -690,6 +691,7 @@ Returns - ``Function`` - :ref:`send `: Will send a transaction to the smart contract and execute its method (Can alter the smart contract state). - ``Function`` - :ref:`estimateGas `: Will estimate the gas used when the method would be executed on chain. Note: You must specify a ``from`` address otherwise you may experience odd behavior. - ``Function`` - :ref:`encodeABI `: Encodes the ABI for this method. This can be send using a transaction, call the method or passing into another smart contracts method as argument. +- ``Function`` - :ref:`createAccessList `: Returns an EIP-2930 access list for specified contract method Note: You must specify a ``from`` address and possible ``gas`` ------- Example @@ -1017,6 +1019,73 @@ Example > '0x58cf5f1000000000000000000000000000000000000000000000000000000000000007B' +------------------------------------------------------------------------------ + +.. _contract-createAccessList: + +methods.myMethod.createAccessList +===================== + +.. code-block:: javascript + + myContract.methods.myMethod([param1[, param2[, ...]]]).createAccessList(options, blockHashOrBlockNumber [, callback]) + +Will call to create an access list a method execution will access when executed in the EVM. +Note: Currently `eth_createAccessList` seems to only be supported by Geth. +Note: You must specify a ``from`` address and ``gas`` if it's not specified in ``options`` when instantiating parent contract object (e.g. ``new web3.eth.Contract(jsonInterface[, address][, options])``). + +---------- +Parameters +---------- + +1. ``options`` - ``Object`` (optional): The options used for calling. + * ``from`` - ``String`` (optional): The address the call "transaction" should be made from. + * ``gas`` - ``Number`` (optional): The maximum gas provided for this call "transaction" (gas limit). Setting a specific value helps to detect out of gas errors. Access list response will return amount of gas used. +2. ``block`` - ``String|Number|BN|BigNumber`` - The block number or hash. Or the string ``"earliest"``, ``"latest"`` or ``"pending"`` as in the :ref:`default block parameter `. +3. ``callback`` - ``Function`` (optional): This callback will be fired with the result of the access list generation as the second argument, or with an error object as the first argument. + +------- +Returns +------- + +``Promise`` returns ``Object``: The generated access list for transaction. + +.. code-block:: javascript + + { + "accessList": [ + { + "address": "0x00f5f5f3a25f142fafd0af24a754fafa340f32c7", + "storageKeys": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] + } + ], + "gasUsed": "0x644e" + } + + +------- +Example +------- + +.. code-block:: javascript + + // using the callback + myContract.methods.myMethod(123).createAccessList({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe', gas: 5000000}, function(error, accessList){ + ... + }); + + // using the promise + myContract.methods.myMethod(123).createAccessList({from: '0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe', gas: 5000000}) + .then(function(accessList){ + ... + }) + .catch(function(error){ + ... + }); + + ------------------------------------------------------------------------------ diff --git a/docs/web3-eth.rst b/docs/web3-eth.rst index ce1da8866fb..ba704689e8d 100644 --- a/docs/web3-eth.rst +++ b/docs/web3-eth.rst @@ -2117,3 +2117,62 @@ Example } ------------------------------------------------------------------------------ + +createAccessList +===================== + +.. code-block:: javascript + + web3.eth.createAccessList(callObject [, callback]) + +Will call to create an access list a method execution will access when executed in the EVM. +Note: Currently `eth_createAccessList` seems to only be supported by Geth. +Note: You must specify a ``from`` address and ``gas`` if it's not specified in ``options`` when instantiating parent contract object (e.g. ``new web3.eth.Contract(jsonInterface[, address][, options])``). + +---------- +Parameters +---------- + +1. A transaction object, see :ref:`web3.eth.sendTransaction ` with the difference that this method is specifically for contract method executions. +2. ``block`` - ``String|Number|BN|BigNumber`` - The block number or hash. Or the string ``"earliest"``, ``"latest"`` or ``"pending"`` as in the :ref:`default block parameter `. +3. ``callback`` - ``Function`` (optional): This callback will be fired with the result of the access list generation as the second argument, or with an error object as the first argument. + + +------- +Returns +------- + +``Promise`` returns ``Object``: The generated access list for transaction. + +.. code-block:: javascript + + { + "accessList": [ + { + "address": "0x00f5f5f3a25f142fafd0af24a754fafa340f32c7", + "storageKeys": [ + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] + } + ], + "gasUsed": "0x644e" + } + +------- +Example +------- + + +.. code-block:: javascript + + web3.eth.createAccessList({ + from: '0x3bc5885c2941c5cda454bdb4a8c88aa7f248e312', + data: '0x20965255', + gasPrice: '0x3b9aca00', + gas: '0x3d0900', + to: '0x00f5f5f3a25f142fafd0af24a754fafa340f32c7' + }) + .then(console.log); + + +------------------------------------------------------------------------------ From 3328be50efc4e1b509cec6ae38c73a0d088c360c Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 14:55:54 -1000 Subject: [PATCH 07/15] Update CHANGELOG.md --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e67e901b3a..15657f6bce7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -447,4 +447,8 @@ Released with 1.0.0-beta.37 code base. - lerna from 3.22.1 to 4.0.0 (#4231) - Dropped build tests in CI for Node v8 and v10, and added support for Node v14 - Change default value for `maxPriorityFeePerGas` from `1 Gwei` to `2.5 Gwei` (#4284) -- Fixed bug in signTransaction (#4295) \ No newline at end of file +- Fixed bug in signTransaction (#4295) + +### Added + +- Support for `eth_createAccessList` as both an rpc call (`web3.eth.createAccessList`) and property of contract method wrappers (`contractInstance.methods.getValue().createAccessList`) (#4332) From 90cf5c9d0ee3d699950db43f930569926e179c51 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 23:40:08 -1000 Subject: [PATCH 08/15] Update docs/web3-eth-contract.rst --- docs/web3-eth-contract.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/web3-eth-contract.rst b/docs/web3-eth-contract.rst index 3f7f8286035..77676f25e8b 100644 --- a/docs/web3-eth-contract.rst +++ b/docs/web3-eth-contract.rst @@ -664,7 +664,7 @@ methods myContract.methods.myMethod([param1[, param2[, ...]]]) -Creates a transaction object for that method, which then can be :ref:`called `, :ref:`send `, :ref:`estimated `, :ref:`estimated ` , or :ref:`ABI encoded `. +Creates a transaction object for that method, which then can be :ref:`called `, :ref:`send `, :ref:`estimated `, :ref:`createAccessList ` , or :ref:`ABI encoded `. The methods of this smart contract are available through: From ccd31b64d7b7443b9532c3870096d3853293cfd3 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 23:40:57 -1000 Subject: [PATCH 09/15] Update docs/web3-eth-contract.rst --- docs/web3-eth-contract.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/web3-eth-contract.rst b/docs/web3-eth-contract.rst index 77676f25e8b..c8765bb5bd3 100644 --- a/docs/web3-eth-contract.rst +++ b/docs/web3-eth-contract.rst @@ -691,7 +691,7 @@ Returns - ``Function`` - :ref:`send `: Will send a transaction to the smart contract and execute its method (Can alter the smart contract state). - ``Function`` - :ref:`estimateGas `: Will estimate the gas used when the method would be executed on chain. Note: You must specify a ``from`` address otherwise you may experience odd behavior. - ``Function`` - :ref:`encodeABI `: Encodes the ABI for this method. This can be send using a transaction, call the method or passing into another smart contracts method as argument. -- ``Function`` - :ref:`createAccessList `: Returns an EIP-2930 access list for specified contract method Note: You must specify a ``from`` address and possible ``gas`` +- ``Function`` - :ref:`createAccessList `: Returns an EIP-2930 access list for specified contract method Note: You must specify a ``from`` address and ``gas`` if it's not specified in ``options`` when instantiating parent contract object (e.g. ``new web3.eth.Contract(jsonInterface[, address][, options])``). ------- Example From e461aa5e70a2901c9bffd9ce9d2df2a88550b978 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 23:41:49 -1000 Subject: [PATCH 10/15] Update docs/web3-eth-contract.rst --- docs/web3-eth-contract.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/web3-eth-contract.rst b/docs/web3-eth-contract.rst index c8765bb5bd3..d1e1edfd3a3 100644 --- a/docs/web3-eth-contract.rst +++ b/docs/web3-eth-contract.rst @@ -1038,7 +1038,7 @@ Note: You must specify a ``from`` address and ``gas`` if it's not specified in ` Parameters ---------- -1. ``options`` - ``Object`` (optional): The options used for calling. +1. ``options`` - ``Object``: The options used for calling. * ``from`` - ``String`` (optional): The address the call "transaction" should be made from. * ``gas`` - ``Number`` (optional): The maximum gas provided for this call "transaction" (gas limit). Setting a specific value helps to detect out of gas errors. Access list response will return amount of gas used. 2. ``block`` - ``String|Number|BN|BigNumber`` - The block number or hash. Or the string ``"earliest"``, ``"latest"`` or ``"pending"`` as in the :ref:`default block parameter `. From 7b9f8b15711f8ee43931e328168dae09c6eff757 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 23:42:08 -1000 Subject: [PATCH 11/15] Update docs/web3-eth-contract.rst --- docs/web3-eth-contract.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/web3-eth-contract.rst b/docs/web3-eth-contract.rst index d1e1edfd3a3..d04cbdd14aa 100644 --- a/docs/web3-eth-contract.rst +++ b/docs/web3-eth-contract.rst @@ -1039,7 +1039,7 @@ Parameters ---------- 1. ``options`` - ``Object``: The options used for calling. - * ``from`` - ``String`` (optional): The address the call "transaction" should be made from. + * ``from`` - ``String``: The address the call "transaction" should be made from. * ``gas`` - ``Number`` (optional): The maximum gas provided for this call "transaction" (gas limit). Setting a specific value helps to detect out of gas errors. Access list response will return amount of gas used. 2. ``block`` - ``String|Number|BN|BigNumber`` - The block number or hash. Or the string ``"earliest"``, ``"latest"`` or ``"pending"`` as in the :ref:`default block parameter `. 3. ``callback`` - ``Function`` (optional): This callback will be fired with the result of the access list generation as the second argument, or with an error object as the first argument. From ac0cce2781af66a97cb734fd40d3265c23c7d0e3 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 23:42:57 -1000 Subject: [PATCH 12/15] Update docs/web3-eth-contract.rst --- docs/web3-eth-contract.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/web3-eth-contract.rst b/docs/web3-eth-contract.rst index d04cbdd14aa..055bd60be04 100644 --- a/docs/web3-eth-contract.rst +++ b/docs/web3-eth-contract.rst @@ -1041,7 +1041,7 @@ Parameters 1. ``options`` - ``Object``: The options used for calling. * ``from`` - ``String``: The address the call "transaction" should be made from. * ``gas`` - ``Number`` (optional): The maximum gas provided for this call "transaction" (gas limit). Setting a specific value helps to detect out of gas errors. Access list response will return amount of gas used. -2. ``block`` - ``String|Number|BN|BigNumber`` - The block number or hash. Or the string ``"earliest"``, ``"latest"`` or ``"pending"`` as in the :ref:`default block parameter `. +2. ``block`` - ``String|Number|BN|BigNumber`` (optional): The block number or hash. Or the string ``"earliest"``, ``"latest"`` or ``"pending"`` as in the :ref:`default block parameter `. 3. ``callback`` - ``Function`` (optional): This callback will be fired with the result of the access list generation as the second argument, or with an error object as the first argument. ------- From f57f64f999dedb0af7413ac987250f0a232d866a Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Fri, 17 Sep 2021 23:43:50 -1000 Subject: [PATCH 13/15] Update docs/web3-eth.rst --- docs/web3-eth.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/web3-eth.rst b/docs/web3-eth.rst index ba704689e8d..985a0c92563 100644 --- a/docs/web3-eth.rst +++ b/docs/web3-eth.rst @@ -2134,7 +2134,7 @@ Parameters ---------- 1. A transaction object, see :ref:`web3.eth.sendTransaction ` with the difference that this method is specifically for contract method executions. -2. ``block`` - ``String|Number|BN|BigNumber`` - The block number or hash. Or the string ``"earliest"``, ``"latest"`` or ``"pending"`` as in the :ref:`default block parameter `. +2. ``block`` - ``String|Number|BN|BigNumber`` (optional): The block number or hash. Or the string ``"earliest"``, ``"latest"`` or ``"pending"`` as in the :ref:`default block parameter `. 3. ``callback`` - ``Function`` (optional): This callback will be fired with the result of the access list generation as the second argument, or with an error object as the first argument. From 78c466fbed6331d85a7e8eae04e4f82f713007e2 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Wed, 22 Sep 2021 16:45:16 -0500 Subject: [PATCH 14/15] Remove duplicate line in CHANGELOG --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db5502218d5..5b628a4bc4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -448,7 +448,6 @@ Released with 1.0.0-beta.37 code base. - Change default value for `maxPriorityFeePerGas` from `1 Gwei` to `2.5 Gwei` (#4284) - Fixed bug in signTransaction (#4295) - Introduced new configuration "blockHeaderTimeout" for waiting of block headers for transaction receipt (#3891) -- Fixed bug in signTransaction (#4295) ## [Unreleased] From 73b81d76fa15a11a4184947732c4102902528579 Mon Sep 17 00:00:00 2001 From: Wyatt Barnes Date: Thu, 30 Sep 2021 13:49:05 -0500 Subject: [PATCH 15/15] Move CHANGELOG addition to 1.6.1 --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 060ebd41302..4bc198ddda1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -452,16 +452,16 @@ Released with 1.0.0-beta.37 code base. ## [1.6.0] -### Added - -- Support for `eth_createAccessList` as both an rpc call (`web3.eth.createAccessList`) and property of contract method wrappers (`contractInstance.methods.getValue().createAccessList`) (#4332) - ### Changed - Partially replace usage of [eth-lib](https://github.com/MaiaVictor/eth-lib) with [ethereumjs-util](https://github.com/ethereumjs/ethereumjs-monorepo/tree/master/packages/util) (#4390) ## [1.6.1] +### Added + +- Support for `eth_createAccessList` as both an rpc call (`web3.eth.createAccessList`) and property of contract method wrappers (`contractInstance.methods.getValue().createAccessList`) (#4332) + ### Changed - Not considering `tx.chainId` if `tx.common.customChain.chainId` is provided for `web3.eth.accounts.signTransaction` function (#4293)