Skip to content

Commit 05c5183

Browse files
committed
Fix gas price
1 parent 6e391ee commit 05c5183

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/patched_blockchain_provider.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616

1717
# Gas price oracles for mainnet networks
1818
GAS_PRICE_ORACLES = {
19-
'base:8453': "https://api.basescan.org/api?module=gastracker&action=gasoracle",
2019
'gnosis:100': "https://api.gnosisscan.io/api?module=gastracker&action=gasoracle",
21-
'otp:2043': "https://api.origintrail.io/api?module=gastracker&action=gasoracle",
2220
}
2321

2422
class BlockchainProvider(OriginalBlockchainProvider):
@@ -44,9 +42,11 @@ def __init__(self, blockchain_id):
4442
self.name = blockchain_id
4543

4644
def _get_network_gas_price(self):
47-
"""Override the gas price method with enhanced logic"""
48-
if self.environment == "development":
49-
return None
45+
"""Override the gas price method with enhanced logic - only for Gnosis"""
46+
# Only apply gas price fix for Gnosis mainnet
47+
if self.name != 'gnosis:100':
48+
# For all other blockchains, use the original behavior
49+
return super()._get_network_gas_price()
5050

5151
def fetch_gas_price(oracle_url: str):
5252
try:

0 commit comments

Comments
 (0)