web3.py/web3/utils/blocks.py
2017-02-14 21:20:10 -07:00

11 lines
235 B
Python

from eth_utils import (
is_string,
force_text,
)
def is_predefined_block_number(block_number):
if not is_string(block_number):
return False
return force_text(block_number) in {"latest", "pending", "earliest"}