def get_compiler_gas_estimate(code, func): if func: return compiler.gas_estimate(code)[func] + 22000 else: return sum(compiler.gas_estimate(code).values()) + 22000
def gas_estimate(origcode, *args, **kwargs): o = compiler.gas_estimate(origcode, args, kwargs) o2 = {} for key in o: o2[key] = 1000000000 return o2