fixed todo item
I'd recommend this
import requests
from brownie import *
+import os
+API_KEY = os.getenv('GASSTATION_KEY')
+
class EthConfig:
def __init__(self):
self.gasPrice = 0
self.gasPriceMax = Wei("100 gwei")
- # TODO: Remove API Key
def fetch_gas_price(self, speed="fast"):
response = requests.get(
- "https://ethgasstation.info/api/ethgasAPI.json?api-key=e7fec12004fbbb558ed0a612131a97f68ddfe83d31a29ac440fc2f11c386"
+ f"https://ethgasstation.info/api/ethgasAPI.json?api-key={API_KEY}"
)
data = response.json()
self.gasPrice = Wei(str(int(data["fast"]) / 10) + " gwei")
