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

EIP1559 #4155

Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ec47e41
npm run build for 1.4.0-rc.0
spacesailor24 Jun 18, 2021
d50f17a
v1.4.0-rc.0
spacesailor24 Jun 18, 2021
87738b7
Update scripts/e2e.geth.instamine.sh to use v1.10.3 of Geth
spacesailor24 Jun 24, 2021
059be6d
Update scripts/e2e.geth.instamine.sh to use v1.10.3 of Geth
spacesailor24 Jun 24, 2021
7b2acdf
Fix typo
spacesailor24 Jun 24, 2021
bc8a427
Fix merge conflict
spacesailor24 Jun 24, 2021
5c11080
WIP
spacesailor24 Jun 25, 2021
c53a87e
Merge branch '1.x' into wyatt/eip1559
spacesailor24 Jun 25, 2021
f963659
Fix type in error catch
spacesailor24 Jun 28, 2021
3e4fcbe
Remove commented code
spacesailor24 Jun 30, 2021
7681019
Update index for tx pricing info
spacesailor24 Jun 30, 2021
3212c05
Correct order of if statements to properly assign tx type
spacesailor24 Jun 30, 2021
43a755f
Update maxFeePerGas calculation
spacesailor24 Jun 30, 2021
51f030e
Init _handleTxType function
spacesailor24 Jun 30, 2021
3b3efb2
Update _handleTxPricing to use gasPrice for eip-1559 txs
spacesailor24 Jun 30, 2021
b458b63
Fix bugs in _handleTxPricing
spacesailor24 Jun 30, 2021
1b66314
Update tests for eip-1559 changes
spacesailor24 Jun 30, 2021
ad5a22e
Fix BN bug: .mul only accepts BN instances
spacesailor24 Jun 30, 2021
4ebd78a
eth.accounts.signTransaction: Add London tests
spacesailor24 Jun 30, 2021
cd490a8
Fix merge conflicts
spacesailor24 Jul 3, 2021
43fc7aa
Add EIP-1559 test without AccessList
spacesailor24 Jul 3, 2021
5c5a517
Add tx.common.hardfork check to _handleTxType
spacesailor24 Jul 3, 2021
34e5cf6
Bug fixes
spacesailor24 Jul 3, 2021
72c9898
Add additional undefined check in _handleTxType
spacesailor24 Jul 3, 2021
073be03
Add additional check for tx.hardfork in _handleTxType
spacesailor24 Jul 3, 2021
1e3d662
Add additional check for tx.hardfork in _handleTxType
spacesailor24 Jul 3, 2021
2bb8c63
Update CHANGELOG
spacesailor24 Jul 3, 2021
572e416
Handling EIP1559 transactions in outputTransactionFormatter (#4167)
corymsmith Jul 7, 2021
abbc390
Revert geth docker version tag
spacesailor24 Jul 8, 2021
ef39538
Add additional EIP-2930 and EIP-1559 tests
spacesailor24 Jul 8, 2021
494f260
Merge branch '1.x' into wyatt/eip1559
spacesailor24 Jul 10, 2021
2437073
Merge branch 'wyatt/eip1559' of github.com:ChainSafe/web3.js into wya…
spacesailor24 Jul 10, 2021
b3ab709
EIP 1559 Debug #2 (#4171)
spacesailor24 Jul 19, 2021
dc810b3
Mergin conflicts
spacesailor24 Jul 19, 2021
e7d3833
Update error message
spacesailor24 Jul 20, 2021
d9c509a
Update error message
spacesailor24 Jul 20, 2021
2a90980
Merge branch 'wyatt/eip1559' of github.com:ChainSafe/web3.js into wya…
spacesailor24 Jul 20, 2021
7324eec
Update use of tx.type
spacesailor24 Jul 21, 2021
d4f1363
Replace hardfork strings with enum
spacesailor24 Jul 21, 2021
f2ca0d8
Type check refactors for _handleTxPricing
spacesailor24 Jul 21, 2021
e0e19f7
Resolve tx.gasPrice if set and tx.type < 0x2 in _handleTxPricing
spacesailor24 Jul 21, 2021
c5be542
Fix _handleTxType logic
spacesailor24 Jul 21, 2021
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
Update maxFeePerGas calculation
  • Loading branch information
spacesailor24 committed Jun 30, 2021
commit 43a755f7f7e3430bf1b50ee4cc6690f9c2f26a9e
16 changes: 10 additions & 6 deletions packages/web3-eth-accounts/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,16 @@ function _handleTxPricing(tx) {
_this._ethereumCall.getGasPrice()
]).then(responses => {
const [block, gasPrice] = responses;
if (block && block.baseFee) {
// Taken from https://github.com/ethers-io/ethers.js/blob/c5bca7767e3f3d43e3d0bd3c9e9420321ee9907a/packages/abstract-provider/src.ts/index.ts#L228
resolve({
maxFeePerGas: tx.maxFeePerGas || utils.toHex(utils.toBN(block.baseFee).mul(2)),
maxPriorityFeePerGas: tx.maxPriorityFeePerGas || '0x1'
});
if (block && block.baseFeePerGas) {
// Taken from https://github.com/ethers-io/ethers.js/blob/ba6854bdd5a912fe873d5da494cb5c62c190adde/packages/abstract-provider/src.ts/index.ts#L230
const maxPriorityFeePerGas = tx.maxPriorityFeePerGas || '0x3B9ACA00'; // 1 Gwei
const maxFeePerGas = tx.maxFeePerGas ||
utils.toHex(
utils.toBN(block.baseFeePerGas)
.mul(2)
.add(utils.toBN(maxPriorityFeePerGas))
);
resolve({ maxFeePerGas, maxPriorityFeePerGas });
} else {
resolve({ gasPrice });
}
Expand Down