Skip to content

Commit

Permalink
adding berlin tx support (#4109)
Browse files Browse the repository at this point in the history
* 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 <gregorymarkou@gmail.com>
  • Loading branch information
Alex and GregTheGreek authored Jun 18, 2021
1 parent 1ed3c68 commit d46883f
Show file tree
Hide file tree
Showing 12 changed files with 9,798 additions and 6,392 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,18 @@ Released with 1.0.0-beta.37 code base.

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

## [1.4.0]

### Added

- Berlin Transaction Support (#4083)
- When signing a transaction, common object now defaults to berlin instead of petersburg

### Changed

### Removes


## [Unreleased]

## [1.3.7]
## [1.4.1]
4 changes: 2 additions & 2 deletions docs/web3-eth-accounts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,14 @@ Parameters
- ``gasPrice`` - ``String``: (optional) The gas price set by this transaction, if empty, it will use :ref:`web3.eth.getGasPrice() <eth-gasprice>`
- ``gas`` - ``String``: The gas provided by the transaction.
- ``chain`` - ``String``: (optional) Defaults to ``mainnet``.
- ``hardfork`` - ``String``: (optional) Defaults to ``petersburg``.
- ``hardfork`` - ``String``: (optional) Defaults to ``berlin``.
- ``common`` - ``Object``: (optional) The common object
- ``customChain`` - ``Object``: The custom chain properties
- ``name`` - ``string``: (optional) The name of the chain
- ``networkId`` - ``number``: Network ID of the custom chain
- ``chainId`` - ``number``: Chain ID of the custom chain
- ``baseChain`` - ``string``: (optional) ``mainnet``, ``goerli``, ``kovan``, ``rinkeby``, or ``ropsten``
- ``hardfork`` - ``string``: (optional) ``chainstart``, ``homestead``, ``dao``, ``tangerineWhistle``, ``spuriousDragon``, ``byzantium``, ``constantinople``, ``petersburg``, or ``istanbul``
- ``hardfork`` - ``string``: (optional) ``chainstart``, ``homestead``, ``dao``, ``tangerineWhistle``, ``spuriousDragon``, ``byzantium``, ``constantinople``, ``petersburg``, ``istanbul``, or ``berlin``
2. ``privateKey`` - ``String``: The private key to sign with.
3. ``callback`` - ``Function``: (optional) Optional callback, returns an error object as first parameter and the result as second.

Expand Down
2 changes: 1 addition & 1 deletion docs/web3-eth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1534,7 +1534,7 @@ Example

.. code-block:: javascript
var Tx = require('ethereumjs-tx').Transaction;
var Tx = require('@ethereumjs/tx').Transaction;
var privateKey = Buffer.from('e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex');
var rawTx = {
Expand Down
15,551 changes: 9,632 additions & 5,919 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@
"crypto-js": "^3.3.0",
"decache": "^4.6.0",
"dependency-check": "^4.1.0",
"ethereumjs-common": "^1.3.2",
"ethereumjs-tx": "^2.1.2",
"ethers": "^5.1.4",
"ganache-cli": "^6.12.0",
"jshint": "^2.12.0",
Expand All @@ -136,5 +134,6 @@
"wait-port": "^0.2.9",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12"
}
},
"dependencies": {}
}
Loading

0 comments on commit d46883f

Please sign in to comment.