Skip to content

Commit 453265f

Browse files
committed
Tighten type of gas estimator
1 parent 30f31c7 commit 453265f

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

eth/estimators/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
import os
22
from typing import (
3-
Any,
3+
Callable,
44
)
55

6+
from eth.rlp.transactions import (
7+
BaseTransaction,
8+
)
69
from eth.utils.module_loading import (
710
import_string,
811
)
12+
from eth.vm.state import (
13+
BaseState,
14+
)
915

1016

11-
def get_gas_estimator() -> Any:
17+
def get_gas_estimator() -> Callable[[BaseState, BaseTransaction], int]:
1218
import_path = os.environ.get(
1319
'GAS_ESTIMATOR_BACKEND_FUNC',
1420
'eth.estimators.gas.binary_gas_search_intrinsic_tolerance',

0 commit comments

Comments
 (0)