Skip to content

Commit 3b39839

Browse files
authored
Merge pull request #667 from valory-xyz/fix/gas-pricing
Fix: Gas pricing on Base
2 parents d090ad2 + 161e27e commit 3b39839

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

operate/wallet/master.py

+7
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
import logging
2424
import os
2525
import typing as t
26+
from copy import deepcopy
2627
from dataclasses import dataclass, field
2728
from pathlib import Path
2829

2930
from aea.crypto.base import Crypto, LedgerApi
3031
from aea.crypto.registries import make_ledger_api
3132
from aea.helpers.logging import setup_logger
33+
from aea_ledger_ethereum import DEFAULT_GAS_PRICE_STRATEGIES, EIP1559, GWEI, to_wei
3234
from aea_ledger_ethereum.ethereum import EthereumApi, EthereumCrypto
3335
from autonomy.chain.base import registry_contracts
3436
from autonomy.chain.config import ChainType as ChainProfile
@@ -100,10 +102,15 @@ def ledger_api(
100102
rpc: t.Optional[str] = None,
101103
) -> LedgerApi:
102104
"""Get ledger api object."""
105+
gas_price_strategies = deepcopy(DEFAULT_GAS_PRICE_STRATEGIES)
106+
if chain == Chain.BASE:
107+
gas_price_strategies[EIP1559]["fallback_estimate"]["maxFeePerGas"] = to_wei(5, GWEI)
108+
103109
return make_ledger_api(
104110
self.ledger_type.name.lower(),
105111
address=(rpc or get_default_rpc(chain=chain)),
106112
chain_id=chain.id,
113+
gas_price_strategies=gas_price_strategies
107114
)
108115

109116
def transfer(

0 commit comments

Comments
 (0)