Skip to main content

All-in-one toolset for blockchain.

Project description

all-tools-on-blockchain

All-in-one toolset for blockchain smart contract analysis. Read on-chain data, query access control roles, compare contract similarity, check deploy time, and verify bytecode.

Install

pip install all-tools-on-blockchain

Tools

Command Description
cread Read on-chain contract public view data and storage slots
acl Query OpenZeppelin AccessControl roles and members
solsim Compare similarity of Solidity contracts in a directory
deploytime Query contract deployment time
bcverify Verify on-chain bytecode against a local compiled artifact

Usage

cread — Read Contract Data

Read all public view functions and default proxy slots:

cread -a 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38

Read a specific storage slot:

cread -a 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 -s 0x0

Example output:

Contract Address: 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38
Contract Name: TimedLockBox
+--------------------------------------------+------------------+---------------------------+--------------------------------------------------------------------+
|          ABI From Which Contract           |    Data Type     |       Variable Name       |                         Value|Input Type                          |
+--------------------------------------------+------------------+---------------------------+--------------------------------------------------------------------+
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 |  no params func  |           owner           |             0x1590a7dc3485cE3D32cDAA7cB60E9F2D68116003             |
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 |  no params func  |     penaltyPercentage     |                                 5                                  |
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 |  no params func  |         totalFees         |                                 0                                  |
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 |       slot       |        _ADMIN_SLOT        | 0x0000000000000000000000000000000000000000000000000000000000000000 |
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 |       slot       |        _BEACON_SLOT       | 0x0000000000000000000000000000000000000000000000000000000000000000 |
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 |       slot       |    _IMPLEMENTATION_SLOT   | 0x0000000000000000000000000000000000000000000000000000000000000000 |
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 |       slot       |       _ROLLBACK_SLOT      | 0x0000000000000000000000000000000000000000000000000000000000000000 |
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 | with params func | getUnlockTimeAndLockedEth |                              address                               |
| 0xb916F7A2233C90f7ca7B09f4Ece6aF9feafB8E38 | with params func |           locks           |                              address                               |
+--------------------------------------------+------------------+---------------------------+--------------------------------------------------------------------+

acl — Query Access Control

acl -a 0xYourContractAddress

Options:

  • -r / --role — Filter by role name or hash (partial match)
  • -p / --proxy — HTTP/SOCKS proxy (e.g. http://127.0.0.1:7890)
  • -o / --output — Export results to .json or .md
  • -c / --chain — Chain ID (default: 1 for Ethereum Mainnet)

solsim — Contract Similarity

Compare all .sol files within a single directory:

solsim -d ./contracts

Cross-compare .sol files between two directories:

solsim -d ./contracts-v1 -d2 ./contracts-v2

Options:

  • -d2 / --dir2 — Second directory to cross-compare against the first
  • -t / --threshold — Minimum similarity ratio (0.0–1.0, default 0.0)

deploytime — Deploy Time

deploytime -a 0xYourContractAddress

Options:

  • -p / --proxy — HTTP/SOCKS proxy
  • -c / --chain — Chain ID (default: 1)

bcverify — Bytecode Verify

Verify on-chain bytecode matches a local compiled artifact:

bcverify -a 0xYourContractAddress -f ./artifacts/Contract.json

Options:

  • -f / --file — Local bytecode file (Hardhat/Foundry JSON artifact, or .bin/.hex)
  • -p / --proxy — HTTP/SOCKS proxy
  • --strict — Strict mode: do not ignore metadata differences
  • -c / --chain — Chain ID (default: 1)

Supported Chains

Any EVM-compatible chain supported by Etherscan V2 API. Use -c to specify the chain ID:

Chain ID
Ethereum 1
BSC 56
Polygon 137
Arbitrum 42161
Optimism 10
... ...

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

all_tools_on_blockchain-0.0.4.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

all_tools_on_blockchain-0.0.4-py3-none-any.whl (15.0 kB view details)

Uploaded Python 3

File details

Details for the file all_tools_on_blockchain-0.0.4.tar.gz.

File metadata

  • Download URL: all_tools_on_blockchain-0.0.4.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for all_tools_on_blockchain-0.0.4.tar.gz
Algorithm Hash digest
SHA256 cefdf6312194e8b0445593ae336435e49fb484bb697622aab69901c5e384df7d
MD5 7aa8f5c49f04dcf2c3a82046410ba04d
BLAKE2b-256 01700967cc0392bbd90b1e6aa909bedae3d74a4e7b0fb5d6c30a196ed0bbbf8a

See more details on using hashes here.

File details

Details for the file all_tools_on_blockchain-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for all_tools_on_blockchain-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1a5cc15fb1f6e4e88c91851fb3d149d1de06a992a0b5e0dce2ec7fbc9bd5b121
MD5 d53ac49fd2eda8b9c646a826c6da4f8d
BLAKE2b-256 84935eb6bb6c8806b5a8ab5696b7741daaf680b51ab0b3a0a2c6e28f79605afd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page