eth-utils
eth-utils copied to clipboard
Utility functions for working with ethereum related codebases.
## What was wrong? Issue # ## How was it fixed? Summary of approach. ### To-Do [//]: # (Stay ahead of things, add list items here!) - [ ] Clean...
## What was wrong? Missing setuptools requirement, even though it is needed [here](https://github.com/ethereum/eth-utils/blob/9d0ba061c55161849ae31a99326329534e0ed1b2/eth_utils/__init__.py#L4). ## How can it be fixed? Add the requirement in `setup.py`.
## What was wrong? I wanted to humanize a str but the only available options were for bytes. ## How was it fixed? Split one method into two methods. ###...
## What was wrong? The signature of `is_same_address` requires both arguments to be `eth_typing.AnyAddress`, but actually, the source code of the function allows any string to be provided. It would...
### What was wrong? The humanize utilities could potentially benefit from a `humanize_wei` function for easy human readable ether values ### How can it be fixed? Exact behavior probably has...
### What was wrong? A number of methods return a value from `keccak` which is guaranteed to be 32 bytes. For example, see: https://github.com/ethereum/eth-utils/blob/d05279c6af22b9e7defc0d7a5df0d7d3422e2061/eth_utils/abi.py#L54-L60 Other methods that require the 32-byte...
### What was wrong? The previous implementation of `ExtendedDebugLogger` cached whether the `DEBUG2` level was enabled. https://github.com/ethereum/py-evm/blob/5c080532168f38023bfebcd4ec60bb68c70fd29d/eth/tools/logging.py#L9-L13 ### How can it be fixed? Use the same pattern for the `eth-utils`...
### What was wrong? When using `to_tuple` on a function which operates on a generic type, type safety is not preserved. ``` TVal = TypeVar('TVal') @to_tuple def typing_to_tuple_generic(values: Sequence[TVal]) ->...
### What was wrong? From: https://github.com/ethereum/eth-utils/pull/151 Looks like `flatten_return`, `reversed_return` and `sorted_return` don't do a good job of retaining type safety. It's not easy to write a test for this...
### What was wrong? The test suite for `to_wei` is not doing fuzz testing against inputs of `float` type. This should be done as I'm not currently sure that there...