Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove build
  • Loading branch information
GregTheGreek committed May 31, 2021
commit a049e063de562ab2499352a202179f4fa0421682
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,17 @@ Released with 1.0.0-beta.37 code base.

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

## [1.4.0]

### Added

- Berlin Transaction Support (#4083)

### Changed

### Removes


## [Unreleased]

## [1.3.7]
## [1.4.1]
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
4 changes: 1 addition & 3 deletions test/e2e.method.signing.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
var assert = require('assert');
var EJSCommon = require('ethereumjs-common');
var EJSTx = require('ethereumjs-tx');
var Basic = require('./sources/Basic');
var utils = require('./helpers/test.utils');
var Web3 = utils.getWeb3();
Expand Down Expand Up @@ -223,7 +221,7 @@ describe('transaction and message signing [ @E2E ]', function() {
await web3.eth.accounts.signTransaction(txObject, wallet[0].privateKey);
assert.fail()
} catch (err) {
assert(err.message.includes('gas limit is too low'));
assert(err.message.includes('gasLimit is too low'));
}
})

Expand Down
39 changes: 39 additions & 0 deletions test/eth.accounts.signTransaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,23 @@ var common = {
harfork: 'petersburg',
};

var commonBerlin = {
baseChain: 'mainnet',
customChain: {
name: 'custom-network',
networkId: 1,
chainId: 1,
},
hardfork: 'berlin'
};

var accessList = [
{
address: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
storageKeys: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55'
}
];

var clone = function (object) { return object ? _.clone(object) : []; };

var tests = [
Expand Down Expand Up @@ -467,6 +484,28 @@ var tests = [
},
error: true
},
{
address: '0x2c7536E3605D9C16a7a3D7b1898e529396a65c23',
iban: 'XE0556YCRTEZ9JALZBSCXOK4UJ5F3HN03DV',
privateKey: '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318',
transaction: {
chainId: 1,
nonce: 0,
gasPrice: "20000000000",
gas: 21000,
to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
toIban: 'XE04S1IRT2PR8A8422TPBL9SR6U0HODDCUT', // will be switched to "to" in the test
value: "1000000000",
data: "",
common: commonBerlin,
accessList: accessList
},
// signature from eth_signTransaction
rawTransaction: "0xf868808504a817c80082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008026a0afa02d193471bb974081585daabf8a751d4decbb519604ac7df612cc11e9226da04bf1bd55e82cebb2b09ed39bbffe35107ea611fa212c2d9a1f1ada4952077118",
oldSignature: "0xf868808504a817c80082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008026a0afa02d193471bb974081585daabf8a751d4decbb519604ac7df612cc11e9226da04bf1bd55e82cebb2b09ed39bbffe35107ea611fa212c2d9a1f1ada4952077118",
transactionHash: "0xab0f71614c37231d71ae521ce188a9c7c9d5e976124a91f62f9f125348dd0326",
messageHash: "0xab0f71614c37231d71ae521ce188a9c7c9d5e976124a91f62f9f125348dd0326"
},
];

describe("eth", function () {
Expand Down