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

Commit c61dd9c

Browse files
committed
add berlin specific hf test case
1 parent b1446c3 commit c61dd9c

File tree

3 files changed

+56
-18
lines changed

3 files changed

+56
-18
lines changed

dist/web3.min.js

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

dist/web3.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/eth.accounts.signTransaction.js

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,23 @@ var common = {
1515
harfork: 'petersburg',
1616
};
1717

18+
var commonBerlin = {
19+
baseChain: 'mainnet',
20+
customChain: {
21+
name: 'custom-network',
22+
networkId: 1,
23+
chainId: 1,
24+
},
25+
hardfork: 'berlin'
26+
};
27+
28+
var accessList = [
29+
{
30+
address: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
31+
storageKeys: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55'
32+
}
33+
];
34+
1835
var clone = function (object) { return object ? _.clone(object) : []; };
1936

2037
var tests = [
@@ -467,6 +484,28 @@ var tests = [
467484
},
468485
error: true
469486
},
487+
{
488+
address: '0x2c7536E3605D9C16a7a3D7b1898e529396a65c23',
489+
iban: 'XE0556YCRTEZ9JALZBSCXOK4UJ5F3HN03DV',
490+
privateKey: '0x4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318',
491+
transaction: {
492+
chainId: 1,
493+
nonce: 0,
494+
gasPrice: "20000000000",
495+
gas: 21000,
496+
to: '0xF0109fC8DF283027b6285cc889F5aA624EaC1F55',
497+
toIban: 'XE04S1IRT2PR8A8422TPBL9SR6U0HODDCUT', // will be switched to "to" in the test
498+
value: "1000000000",
499+
data: "",
500+
common: commonBerlin,
501+
accessList: accessList
502+
},
503+
// signature from eth_signTransaction
504+
rawTransaction: "0xf868808504a817c80082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008026a0afa02d193471bb974081585daabf8a751d4decbb519604ac7df612cc11e9226da04bf1bd55e82cebb2b09ed39bbffe35107ea611fa212c2d9a1f1ada4952077118",
505+
oldSignature: "0xf868808504a817c80082520894f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008026a0afa02d193471bb974081585daabf8a751d4decbb519604ac7df612cc11e9226da04bf1bd55e82cebb2b09ed39bbffe35107ea611fa212c2d9a1f1ada4952077118",
506+
transactionHash: "0xab0f71614c37231d71ae521ce188a9c7c9d5e976124a91f62f9f125348dd0326",
507+
messageHash: "0xab0f71614c37231d71ae521ce188a9c7c9d5e976124a91f62f9f125348dd0326"
508+
},
470509
];
471510

472511
describe("eth", function () {

0 commit comments

Comments
 (0)