From e0fe03d41def6e0cafbf9d1acf32eb6335ff6778 Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Thu, 29 Aug 2019 16:17:52 +0200 Subject: [PATCH] Add support for EIP-2028 for Istanbul --- package.json | 2 +- test/api.ts | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 281f506..8c731b3 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "author": "mjbecze ", "license": "MPL-2.0", "dependencies": { - "ethereumjs-common": "^1.3.0", + "ethereumjs-common": "^1.3.1", "ethereumjs-util": "^6.0.0" }, "devDependencies": { diff --git a/test/api.ts b/test/api.ts index ac6f30d..43ea13b 100644 --- a/test/api.ts +++ b/test/api.ts @@ -410,4 +410,14 @@ tape('[Transaction]: Basic functions', function(t) { st.end() }, ) + + t.test('should return correct data fee for istanbul', function(st) { + let tx = new Transaction({}, { hardfork: 'istanbul' }) + st.equals(tx.getDataFee().toNumber(), 0) + + tx = new Transaction(txFixtures[3].raw, { hardfork: 'istanbul' }) + st.equals(tx.getDataFee().toNumber(), 1716) + + st.end() + }) })