File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 23
23
import logging
24
24
import os
25
25
import typing as t
26
+ from copy import deepcopy
26
27
from dataclasses import dataclass , field
27
28
from pathlib import Path
28
29
29
30
from aea .crypto .base import Crypto , LedgerApi
30
31
from aea .crypto .registries import make_ledger_api
31
32
from aea .helpers .logging import setup_logger
33
+ from aea_ledger_ethereum import DEFAULT_GAS_PRICE_STRATEGIES , EIP1559 , GWEI , to_wei
32
34
from aea_ledger_ethereum .ethereum import EthereumApi , EthereumCrypto
33
35
from autonomy .chain .base import registry_contracts
34
36
from autonomy .chain .config import ChainType as ChainProfile
@@ -100,10 +102,15 @@ def ledger_api(
100
102
rpc : t .Optional [str ] = None ,
101
103
) -> LedgerApi :
102
104
"""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
+
103
109
return make_ledger_api (
104
110
self .ledger_type .name .lower (),
105
111
address = (rpc or get_default_rpc (chain = chain )),
106
112
chain_id = chain .id ,
113
+ gas_price_strategies = gas_price_strategies
107
114
)
108
115
109
116
def transfer (
You can’t perform that action at this time.
0 commit comments