Skip to content

Commit

Permalink
Merge pull request #1727 from eth-brownie/default-eip1559
Browse files Browse the repository at this point in the history
Default to EIP1559-style transactions on live networks
  • Loading branch information
iamdefinitelyahuman authored Jan 30, 2024
2 parents 762f4b4 + f3c0dd9 commit 2c83611
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions brownie/data/default-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ networks:
live:
gas_limit: auto
gas_buffer: 1.1
gas_price: auto
gas_price: null
max_fee: null
priority_fee: null
priority_fee: auto
reverting_tx_gas_limit: false
default_contract_owner: false

Expand Down
7 changes: 6 additions & 1 deletion brownie/network/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,12 @@ def _make_transaction(
priority_fee = CONFIG.active_network["settings"]["priority_fee"] or None

if priority_fee == "auto":
priority_fee = Chain().priority_fee
try:
priority_fee = Chain().priority_fee
except ValueError:
# fallback to legacy transactions if network does not support EIP1559
CONFIG.active_network["settings"]["priority_fee"] = None
priority_fee = None

try:
# if max fee and priority fee are not set, use gas price
Expand Down

0 comments on commit 2c83611

Please sign in to comment.