Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit d46883f

Browse files
AlexGregTheGreek
Alex
andauthored
adding berlin tx support (#4109)
* add berlin tx support * update install locations * update package name in comment * fix existing tests to support new tx sigining format * remove build * remove old test case * use latest ethereumjs/tx * bump deps and fix test * update hashes * fix messageHash, decoding bug * fix tests * add hack * adding eip2930 and common object * fix lint updating package-lock * fix berlin tx signing and recovery * updating ethereumjs/tx package * updating checksum * removing helper.js * updating changelog and docs * fixing typo Co-authored-by: Gregory Markou <[email protected]>
1 parent 1ed3c68 commit d46883f

12 files changed

+9798
-6392
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,18 @@ Released with 1.0.0-beta.37 code base.
383383

384384
- Accidental commit (yarn-error.log) (#4062)
385385

386+
## [1.4.0]
387+
388+
### Added
389+
390+
- Berlin Transaction Support (#4083)
391+
- When signing a transaction, common object now defaults to berlin instead of petersburg
392+
393+
### Changed
394+
395+
### Removes
396+
397+
386398
## [Unreleased]
387399

388-
## [1.3.7]
400+
## [1.4.1]

docs/web3-eth-accounts.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ Parameters
158158
- ``gasPrice`` - ``String``: (optional) The gas price set by this transaction, if empty, it will use :ref:`web3.eth.getGasPrice() <eth-gasprice>`
159159
- ``gas`` - ``String``: The gas provided by the transaction.
160160
- ``chain`` - ``String``: (optional) Defaults to ``mainnet``.
161-
- ``hardfork`` - ``String``: (optional) Defaults to ``petersburg``.
161+
- ``hardfork`` - ``String``: (optional) Defaults to ``berlin``.
162162
- ``common`` - ``Object``: (optional) The common object
163163
- ``customChain`` - ``Object``: The custom chain properties
164164
- ``name`` - ``string``: (optional) The name of the chain
165165
- ``networkId`` - ``number``: Network ID of the custom chain
166166
- ``chainId`` - ``number``: Chain ID of the custom chain
167167
- ``baseChain`` - ``string``: (optional) ``mainnet``, ``goerli``, ``kovan``, ``rinkeby``, or ``ropsten``
168-
- ``hardfork`` - ``string``: (optional) ``chainstart``, ``homestead``, ``dao``, ``tangerineWhistle``, ``spuriousDragon``, ``byzantium``, ``constantinople``, ``petersburg``, or ``istanbul``
168+
- ``hardfork`` - ``string``: (optional) ``chainstart``, ``homestead``, ``dao``, ``tangerineWhistle``, ``spuriousDragon``, ``byzantium``, ``constantinople``, ``petersburg``, ``istanbul``, or ``berlin``
169169
2. ``privateKey`` - ``String``: The private key to sign with.
170170
3. ``callback`` - ``Function``: (optional) Optional callback, returns an error object as first parameter and the result as second.
171171

docs/web3-eth.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1534,7 +1534,7 @@ Example
15341534

15351535
.. code-block:: javascript
15361536
1537-
var Tx = require('ethereumjs-tx').Transaction;
1537+
var Tx = require('@ethereumjs/tx').Transaction;
15381538
var privateKey = Buffer.from('e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex');
15391539
15401540
var rawTx = {

package-lock.json

Lines changed: 9632 additions & 5919 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@
114114
"crypto-js": "^3.3.0",
115115
"decache": "^4.6.0",
116116
"dependency-check": "^4.1.0",
117-
"ethereumjs-common": "^1.3.2",
118-
"ethereumjs-tx": "^2.1.2",
119117
"ethers": "^5.1.4",
120118
"ganache-cli": "^6.12.0",
121119
"jshint": "^2.12.0",
@@ -136,5 +134,6 @@
136134
"wait-port": "^0.2.9",
137135
"webpack": "^4.44.2",
138136
"webpack-cli": "^3.3.12"
139-
}
137+
},
138+
"dependencies": {}
140139
}

0 commit comments

Comments
 (0)