-
Notifications
You must be signed in to change notification settings - Fork 979
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slither-read-storage native POA support (#1843)
* Native support for POA networks in read_storage * Set `srs.rpc` before `srs.block` * Type hint * New RpcInfo class w/ RpcInfo.web3 and RpcInfo.block In SlitherReadStorage, self.rpc_info: Optional[RpcInfo] replaces self.rpc, self._block, self._web3 * Black * Update test_read_storage.py * Add import in __init__.py * Avoid instantiating SRS twice * Add comment about `get_block` for POA networks * Pylint * Black * Allow other valid block string arguments ["latest", "earliest", "pending", "safe", "finalized"] * `args.block` can be in ["latest", "earliest", "pending", "safe", "finalized"] * Use BlockTag enum class for valid `str` arguments * Tweak `RpcInfo.__init__()` signature * get rid of `or "latest"` * Import BlockTag * Use `web3.types.BlockIdentifier` * Revert BlockTag enum * Pylint and black * Replace missing newline * Update slither/tools/read_storage/__main__.py Better, cleaner python Co-authored-by: alpharush <[email protected]> * Drop try/except around args.block parsing allow ValueError if user provides invalid block arg * Remove unused import --------- Co-authored-by: alpharush <[email protected]>
- Loading branch information
1 parent
48e3466
commit 00461aa
Showing
4 changed files
with
57 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .read_storage import SlitherReadStorage | ||
from .read_storage import SlitherReadStorage, RpcInfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters