Beispiel #1
0
 def calc_gas_price(self, w3, transaction_params):
     gas_price_param = self.gas_price_param
     if (gas_price_param.isdigit()):
         return int(self.gas_price_param)
     if (gas_price_param == "fast"):
         return (fast_gas_price_strategy(w3, transaction_params))
     if (gas_price_param == "medium"):
         return (medium_gas_price_strategy(w3, transaction_params))
     if (gas_price_param == "slow"):
         return (slow_gas_price_strategy(w3, transaction_params))
     raise Exception("Unknown gas price strategy: %s"%gas_price_param)
Beispiel #2
0
def overshooting_fast_gasprice(*args, **kwargs):
    return ceil(fast_gas_price_strategy(*args, **kwargs) * OVERSHOOT)