{"id":18357207,"url":"https://github.com/nethermindeth/entro","last_synced_at":"2025-04-06T12:32:41.576Z","repository":{"id":172597860,"uuid":"649488494","full_name":"NethermindEth/entro","owner":"NethermindEth","description":"Library Interacting with Blockchains","archived":false,"fork":false,"pushed_at":"2025-03-06T03:52:21.000Z","size":3267,"stargazers_count":24,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T00:34:00.587Z","etag":null,"topics":["nubia"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NethermindEth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-05T01:33:41.000Z","updated_at":"2024-10-16T09:30:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"f321968c-6586-4f4d-bd60-f59f4bb04b80","html_url":"https://github.com/NethermindEth/entro","commit_stats":null,"previous_names":["nethermindeth/python-eth-amm","nethermindeth/entro"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fentro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fentro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fentro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NethermindEth%2Fentro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NethermindEth","download_url":"https://codeload.github.com/NethermindEth/entro/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247484636,"owners_count":20946388,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nubia"],"created_at":"2024-11-05T22:13:13.230Z","updated_at":"2025-04-06T12:32:36.585Z","avatar_url":"https://github.com/NethermindEth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Python package for Interacting with Blockchains\n\n\u003e This package is current an early release.  If you encounter any issues, please open an issue on the repository\n\n## Features:\n* Backfill \u0026 Decode blockchain Data to CSV (ethereum-etl w/ ABI decoding)\n* Starknet Data Backfilling\n* Utility functions for interacting with Starknet\n* Simulate Uniswap V3 Behavior\n\n\n## Documentation\n[Entro Documentation](https://nethermindeth.github.io/entro/)\n\n\n## Installation\n```bash\n# Using pip install\npip install git+https://github.com/NethermindEth/entro\n\n# Adding as poetry dependency\npoetry add git+https://github.com/NethermindEth/entro\n```\n\n\n## Basic CLI Use\nEntro uses the python rich package extensively for styling and formatting console output.  Most modern consoles are\nsupported, but if the output from commands is not formatted correctly or characters are missing, check out\nthe [Rich Documentation](https://rich.readthedocs.io/en/stable/introduction.html)\n\n```bash\n# Configure RPC Node for CLI\nexport JSON_RPC=https://free-rpc.nethermind.io/mainnet-juno/\n\n# If you have a Starknet API Key from voyager.online:\nexport JSON_RPC=https://rpc.nethermind.io/mainnet-juno/?apikey=YOUR_API_KEY\n\n# WARNING: The get contract command can calls the RPC hundreds of times in some cases with complex contracts\n# This algorithm uses bisection to locate block numbers where contract classes are deployed/updated\nentro get starknet contract 0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\n\n# Outputs the Contract Implementation History for a Contract Address\n╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ Implementation History for Contract 0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7                                                                            │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n{\n  \"1407\": {\n    \"proxy_class\": \"0x00d0e183745e9dae3e4e78a8ffedcce0903fc4900beace4e0abf192d4c202da3\",\n    \"1407\": \"0x0000000000000000000000000000000000000000000000000000000000000000\",\n    \"1472\": \"0x038c25d465b4c5edf024aefae63dc2f6266dd8ba303763de00da4430b5ee8759\",\n    \"2823\": \"0x048624e084dc68d82076582219c7ed8cb0910c01746cca3cd72a28ecfe07e42d\",\n    \"541380\": \"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8\"\n  },\n  \"541384\": \"0x05ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed\",\n  \"629092\": \"0x07f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420\"\n}\n\n\n# inspect a starknet ABI \u0026 get the functions \u0026 events defined inside a Starknet Class \n# Gets Starknet ABI JSON \u0026 Parses into function \u0026 event signatures\n\nentro get starknet class 0x07f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420\n\n╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ ABI for Class 0x07f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420                                                                                                  │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n---- Functions ----\n  increase_allowance(spender: ContractAddress, added_value: U256) -\u003e (Bool)\n  decrease_allowance(spender: ContractAddress, subtracted_value: U256) -\u003e (Bool)\n  increaseAllowance(spender: ContractAddress, addedValue: U256) -\u003e (Bool)\n  decreaseAllowance(spender: ContractAddress, subtractedValue: U256) -\u003e (Bool)\n  permissioned_mint(account: ContractAddress, amount: U256) -\u003e ()\n  permissioned_burn(account: ContractAddress, amount: U256) -\u003e ()\n  permissionedMint(account: ContractAddress, amount: U256) -\u003e ()\n  permissionedBurn(account: ContractAddress, amount: U256) -\u003e ()\n  get_upgrade_delay() -\u003e (U64)\n  get_impl_activation_time(implementation_data: {impl_hash: ClassHash, eic_data: Option[{eic_hash: ClassHash, eic_init_data: [Felt]}], final: Bool}) -\u003e (U64)\n  add_new_implementation(implementation_data: {impl_hash: ClassHash, eic_data: Option[{eic_hash: ClassHash, eic_init_data: [Felt]}], final: Bool}) -\u003e ()\n  remove_implementation(implementation_data: {impl_hash: ClassHash, eic_data: Option[{eic_hash: ClassHash, eic_init_data: [Felt]}], final: Bool}) -\u003e ()\n  replace_to(implementation_data: {impl_hash: ClassHash, eic_data: Option[{eic_hash: ClassHash, eic_init_data: [Felt]}], final: Bool}) -\u003e ()\n  has_role(role: Felt, account: ContractAddress) -\u003e (Bool)\n  get_role_admin(role: Felt) -\u003e (Felt)\n  is_governance_admin(account: ContractAddress) -\u003e (Bool)\n  is_upgrade_governor(account: ContractAddress) -\u003e (Bool)\n  register_governance_admin(account: ContractAddress) -\u003e ()\n  remove_governance_admin(account: ContractAddress) -\u003e ()\n  register_upgrade_governor(account: ContractAddress) -\u003e ()\n  remove_upgrade_governor(account: ContractAddress) -\u003e ()\n  renounce(role: Felt) -\u003e ()\n  name() -\u003e (Felt)\n  symbol() -\u003e (Felt)\n  decimals() -\u003e (U8)\n  total_supply() -\u003e (U256)\n  balance_of(account: ContractAddress) -\u003e (U256)\n  allowance(owner: ContractAddress, spender: ContractAddress) -\u003e (U256)\n  transfer(recipient: ContractAddress, amount: U256) -\u003e (Bool)\n  transfer_from(sender: ContractAddress, recipient: ContractAddress, amount: U256) -\u003e (Bool)\n  approve(spender: ContractAddress, amount: U256) -\u003e (Bool)\n  totalSupply() -\u003e (U256)\n  balanceOf(account: ContractAddress) -\u003e (U256)\n  transferFrom(sender: ContractAddress, recipient: ContractAddress, amount: U256) -\u003e (Bool)\n---- Events ----\n  Transfer(from: ContractAddress, to: ContractAddress, value: U256)\n  Approval(owner: ContractAddress, spender: ContractAddress, value: U256)\n  ImplementationAdded(implementation_data: {impl_hash: ClassHash, eic_data: Option[{eic_hash: ClassHash, eic_init_data: [Felt]}], final: Bool})\n  ImplementationRemoved(implementation_data: {impl_hash: ClassHash, eic_data: Option[{eic_hash: ClassHash, eic_init_data: [Felt]}], final: Bool})\n  ImplementationReplaced(implementation_data: {impl_hash: ClassHash, eic_data: Option[{eic_hash: ClassHash, eic_init_data: [Felt]}], final: Bool})\n  ImplementationFinalized(impl_hash: ClassHash)\n  RoleGranted(role: Felt, account: ContractAddress, sender: ContractAddress)\n  RoleRevoked(role: Felt, account: ContractAddress, sender: ContractAddress)\n  RoleAdminChanged(role: Felt, previous_admin_role: Felt, new_admin_role: Felt)\n  GovernanceAdminAdded(added_account: ContractAddress, added_by: ContractAddress)\n  GovernanceAdminRemoved(removed_account: ContractAddress, removed_by: ContractAddress)\n  UpgradeGovernorAdded(added_account: ContractAddress, added_by: ContractAddress)\n  UpgradeGovernorRemoved(removed_account: ContractAddress, removed_by: ContractAddress)\n```\n\n## Decode Starknet Transactions\nThe get transaction command fetches the transaction trace, and searches through all of the class hashes present \nin the trace.  From here, it decoded all sub-calls of the trace.  The output shows the contract address\nand the called function.  To list the full decoded trace \u0026 events, add cli option --full-trace.\nTo include the raw calldata, result, and event data/keys, pass the --raw flag\n```bash\nentro get starknet transaction 0x01eaebf1a9ff736c78d07b4948ad446ea179351d39b4ddcd9cc68a027fc23683\n\n╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│  Transaction Trace -- 0x01eaebf1a9ff736c78d07b4948ad446ea179351d39b4ddcd9cc68a027fc23683                                                                                          │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\nExecute Trace\n└──  __execute__  --  0x01fc0e4b...1641f198\n    ├──  transfer  --  0x049d3657...9e004dc7\n    ├──  mint_and_deposit  --  0x02e0af29...22184067\n    │   ├──  mint  --  0x07b696af...45318b30\n    │   ├──  is_account_authorized  --  0x07b696af...45318b30\n    │   ├──  get_pool_price  --  0x00000005...e0325b4b\n    │   ├──  balanceOf  --  0x049d3657...9e004dc7\n    │   ├──  balanceOf  --  0x053c9125...ecf368a8\n    │   └──  lock  --  0x00000005...e0325b4b\n    │       └──  locked  --  0x02e0af29...22184067\n    │           ├──  update_position  --  0x00000005...e0325b4b\n    │           ├──  transfer  --  0x049d3657...9e004dc7\n    │           └──  deposit  --  0x00000005...e0325b4b\n    │               └──  balanceOf  --  0x049d3657...9e004dc7\n    └──  clear  --  0x02e0af29...22184067\n        ├──  balanceOf  --  0x049d3657...9e004dc7\n        └──  transfer  --  0x049d3657...9e004dc7\n╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ Execute Events                                                                                                                                                                    │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n   transaction_executed  -- 0x01fc0e4b...1641f198\n   Transfer  -- 0x049d3657...9e004dc7\n   PositionMinted  -- 0x02e0af29...22184067\n   Deposit  -- 0x02e0af29...22184067\n   Transfer  -- 0x07b696af...45318b30\n   PositionUpdated  -- 0x00000005...e0325b4b\n   Transfer  -- 0x049d3657...9e004dc7\n   Transfer  -- 0x049d3657...9e004dc7\n\n\n# For full decoded data \u0026 events\nentro get starknet transaction 0x44c8d0d48bbdfd1f062ba47337edf501a1b3beb65d8193d89102e0ab708d819 --full-trace\n\n╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│  Transaction Trace -- 0x044c8d0d48bbdfd1f062ba47337edf501a1b3beb65d8193d89102e0ab708d819                                                                                          │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\nExecute Trace\n└──  __execute__  --  0x03b1ac62aa5d4f596a0c6058f4a57716072e53da44ce67999f69e9b6c321c5e6\n    ╭─────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n    │ Decoded Inputs  │ {\"calls\": [{\"to\": \"0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\", \"selector\":                                                         │\n    │                 │ \"0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e\", \"calldata\": [\"0x019252b1deef483477c4d30cfcc3e5ed9c82fafea44669c182a45a01b4fdb97a\",      │\n    │                 │ \"0x71afd498d00000\", \"0x00\"]}, {\"to\": \"0x022993789c33e54e0d296fc266a9c9a2e9dcabe2e48941f5fa1bd5692ac4a8c4\", \"selector\":                                      │\n    │                 │ \"0x54cd8cfffad75abfde6525af316085ef4b5d27975ed55042d341c61d19c7a4\", \"calldata\": [\"0x409d72\"]}]}                                                             │\n    │ Decoded Outputs │ [[\"0x01\"], []]                                                                                                                                              │\n    │ Class Hash      │ 0x01a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003                                                                                          │\n    ╰─────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n    ├──  transfer  --  0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7\n    │   ╭─────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n    │   │ Decoded Inputs  │ {\"recipient\": \"0x019252b1deef483477c4d30cfcc3e5ed9c82fafea44669c182a45a01b4fdb97a\", \"amount\": 32000000000000000} │\n    │   │ Decoded Outputs │ [\"True\"]                                                                                                         │\n    │   │ Class Hash      │ 0x05ffbcfeb50d200a0677c48a129a11245a3fc519d1d98d76882d1c9a1b19c6ed                                               │\n    │   ╰─────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n    └──  watch  --  0x022993789c33e54e0d296fc266a9c9a2e9dcabe2e48941f5fa1bd5692ac4a8c4\n        ╭─────────────────┬────────────────────────────────────────────────────────────────────╮\n        │ Decoded Inputs  │ {\"_Id\": \"0x409d72\"}                                                │\n        │ Decoded Outputs │ []                                                                 │\n        │ Class Hash      │ 0x0228e8e5f1a078a7f43763d3d19be58689fcdfba4589629bf65180139db7ea3d │\n        ╰─────────────────┴────────────────────────────────────────────────────────────────────╯\n╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ Execute Events                                                                                                                                                                    │\n╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭──────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ Name     │ TransactionExecuted                                                                                        │\n│ Contract │ 0x03b1ac62aa5d4f596a0c6058f4a57716072e53da44ce67999f69e9b6c321c5e6                                         │\n│ Decoded  │ {\"hash\": \"0x044c8d0d48bbdfd1f062ba47337edf501a1b3beb65d8193d89102e0ab708d819\", \"response\": [[\"0x01\"], []]} │\n╰──────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭──────────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮\n│ Name     │ Transfer                                                                                                                                                               │\n│ Contract │ 0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7                                                                                                     │\n│ Decoded  │ {\"from\": \"0x03b1ac62aa5d4f596a0c6058f4a57716072e53da44ce67999f69e9b6c321c5e6\", \"to\": \"0x019252b1deef483477c4d30cfcc3e5ed9c82fafea44669c182a45a01b4fdb97a\", \"value\":    │\n│          │ 32000000000000000}                                                                                                                                                     │\n╰──────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯\n╭──────────┬────────────────────────────────────────────────────────────────────╮\n│ Name     │ watch_ls_id                                                        │\n│ Contract │ 0x022993789c33e54e0d296fc266a9c9a2e9dcabe2e48941f5fa1bd5692ac4a8c4 │\n│ Decoded  │ {\"id\": \"0x409d72\"}                                                 │\n╰──────────┴────────────────────────────────────────────────────────────────────╯\n\n```\n\n## Backfill CLI\n```bash\nexport JSON_RPC=https://free-rpc.nethermind.io/mainnet-juno/\n# Full blocks downloads blocks, transactions, and events\nentro backfill starknet full-blocks --from-block 600000 --to-block 600500 --block-file=blocks.csv --transaction-file=transactions.csv --event-file=events.csv\n\n                             Backfill Block Ranges\n┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Start Block              ┃ End Block            ┃               Total Blocks ┃\n┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ 600,000                  │ 600,500              │                        500 │\n└──────────────────────────┴──────────────────────┴────────────────────────────┘\n                          Backfill Filters \u0026 Metadata                           \n┏━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Key             ┃ Value                                                      ┃\n┡━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ json_rpc        │ https://free-rpc.nethermind.io/mainnet-juno/                         │\n└─────────────────┴────────────────────────────────────────────────────────────┘\nQuerying Transactions, Logs, and Receipts for Block Range\n------------------------------------------------------------------------------------------------------------------------------------------------\nExecute Backfill?   [y/n]:\n\n# Once a backfill is confirmed, the CLI will begin downloading the data from the RPC node\n# Progress Bar will display backfill progress\n\nBackfill StarkNet Full Blocks ⠧ ━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━   6% 0:00:17 0:05:26 Searched: 30/500 Searching Block: 600030\n```\n\n## ABI Decoding\nEntro supports ABI Decoding for most datatypes.  Abis are loaded by event/function signature.\n\nABI-Priority is used to determine which ABI definition is used to decode a certain datatype.\n\nAn AMM Pool and ERC20 token will both implement a transfer function.  By setting the priority of the ERC20 ABI to 5, and the AMM ABI to 4, any function or event with the Transfer signature/event-key will be decoded by the ERC20 ABI, and ignored by the AMM ABI.\n\n\n```bash\n# EVM Abis are added using a path to a JSON file\nentro decode add-abi ERC20 /path/to/ERC20.json --priority = 100 # Set Standard ABIs with the highest priorities\n\n# Starknet Abis are added using a Class Hash\nentro decode add-class Starknet-ETH 0x07f3777c99f3700505ea966676aac4a0d692c2a9f5e667f4c606b51ca1dd3420 --priority=100\nentro decode add-class AVNU-Exchange 0x07b33a07ec099c227130ddffc9d74ad813fbcb8e0ff1c0f3ce097958e3dfc70b --priority=40\n\n# To view the currently known ABIs \u0026 the functions they decode, list-abi-decoders\nentro decode list-abi-decoders Cairo\n\n                                                               Cairo Decoder ABIs                                                               \n┏━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Name          ┃ Priority ┃ Functions                                                                  ┃ Events                               ┃\n┡━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ Starknet-ETH  │ 100      │ 'add_new_implementation', 'allowance', 'approve', 'balanceOf',             │ 'Approval', 'GovernanceAdminAdded',  │\n│               │          │ 'balance_of', 'decimals', 'decreaseAllowance', 'decrease_allowance',       │ 'GovernanceAdminRemoved',            │\n│               │          │ 'get_impl_activation_time', 'get_role_admin', 'get_upgrade_delay',         │ 'ImplementationAdded',               │\n│               │          │ 'has_role', 'increaseAllowance', 'increase_allowance',                     │ 'ImplementationFinalized',           │\n│               │          │ 'is_governance_admin', 'is_upgrade_governor', 'name', 'permissionedBurn',  │ 'ImplementationRemoved',             │\n│               │          │ 'permissionedMint', 'permissioned_burn', 'permissioned_mint',              │ 'ImplementationReplaced',            │\n│               │          │ 'register_governance_admin', 'register_upgrade_governor',                  │ 'RoleAdminChanged', 'RoleGranted',   │\n│               │          │ 'remove_governance_admin', 'remove_implementation',                        │ 'RoleRevoked', 'Transfer',           │\n│               │          │ 'remove_upgrade_governor', 'renounce', 'replace_to', 'symbol',             │ 'UpgradeGovernorAdded',              │\n│               │          │ 'totalSupply', 'total_supply', 'transfer', 'transferFrom',                 │ 'UpgradeGovernorRemoved',            │\n│               │          │ 'transfer_from',                                                           │                                      │\n├───────────────┼──────────┼────────────────────────────────────────────────────────────────────────────┼──────────────────────────────────────┤\n│ AVNU-Exchange │ 40       │ 'get_adapter_class_hash', 'get_fees_active', 'get_fees_bps_0',             │ 'OwnershipTransferred', 'Swap',      │\n│               │          │ 'get_fees_bps_1', 'get_fees_recipient', 'get_owner',                       │                                      │\n│               │          │ 'get_swap_exact_token_to_fees_bps', 'locked', 'multi_route_swap',          │                                      │\n│               │          │ 'set_adapter_class_hash', 'set_fees_active', 'set_fees_bps_0',             │                                      │\n│               │          │ 'set_fees_bps_1', 'set_fees_recipient',                                    │                                      │\n│               │          │ 'set_swap_exact_token_to_fees_bps', 'swap_exact_token_to',                 │                                      │\n│               │          │ 'transfer_ownership', 'upgrade_class',                                     │                                      │\n└───────────────┴──────────┴────────────────────────────────────────────────────────────────────────────┴──────────────────────────────────────┘\n\n```\n\n\n## Backfilling Decoded Events\n```bash\nentro backfill starknet events --contract-address 0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f -abi AVNU-Exchange --event-file=swap_events.csv --from-block 640000 --to-block 655000 --event-name Swap --batch-size 5000\n\n                             Backfill Block Ranges\n┏━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Start Block              ┃ End Block            ┃               Total Blocks ┃\n┡━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ 640,000                  │ 655,000              │                     15,000 │\n└──────────────────────────┴──────────────────────┴────────────────────────────┘\n                                  Backfill Filters \u0026 Metadata                                  \n┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Key              ┃ Value                                                                    ┃\n┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ contract_address │ 0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f       │\n│ event_names      │ ['Swap']                                                                 │\n│ abi_name         │ AVNU-Exchange                                                            │\n│ json_rpc         │ https://free-rpc.nethermind.io/mainnet-juno/                             │\n│ batch_size       │ 5000                                                                     │\n│ topics           │ [['0x00e316f0d9d2a3affa97de1d99bb2aac0538e2666d0d8545545ead241ef0ccab']] │\n└──────────────────┴──────────────────────────────────────────────────────────────────────────┘\n                               Cairo Decoder ABIs                               \n┏━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Name               ┃ Priority    ┃ Events                                    ┃\n┡━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ AVNU-Exchange      │ 40          │ 'OwnershipTransferred', 'Swap',           │\n└────────────────────┴─────────────┴───────────────────────────────────────────┘\nQuerying Events for Contract: 0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f\nAVNU-Exchange ABI Decoding Events:\n        'Swap',\n------------------------------------------------------------------------------------------------------------------------------------------------\nExecute Backfill?   [y/n]:\n\nBackfill AVNU-Exchange Events ⠧ ━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━  29% 0:00:12 -:--:-- Searched: 5000/15000 Searching Block: 64500\n\n---- Backfill Complete ------\n\n# CSV Data will be saved pipe-separated, and array/dict columns will be encoded as JSON\n\nhead -2 swap_events.csv\n\n#   block_number|tx_index|event_index|contract_address|class_hash|keys|data|event_name|decoded_params\n#   640000|-1|-1|0x04270219d365d6b017231b52e92b3fb5d7c8378b05e9abc97724537a80e93b0f||[\"0x00e316f0d9d2a3affa97de1d99bb2aac0538e2666d0d8545545ead241ef0ccab\"]|[\"0x061e1a7ffad235cd34d5da18c\n#   75efd01c3ae7b5029cafbf9f136f74c3fd6603c\", \"0x00585c32b625999e6e5e78645ff8df7a9001cf5cf3eb6b80ccdd16cb64bd3a34\", \"0x000000000000000000000000000000000000000000000001bded06268d96b74f\",\n#   \"0x0000000000000000000000000000000000000000000000000000000000000000\", \"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8\", \"0x0000000000000000000000000000000000000\n#   0000000000000000000013a5221\", \"0x0000000000000000000000000000000000000000000000000000000000000000\", \"0x061e1a7ffad235cd34d5da18c75efd01c3ae7b5029cafbf9f136f74c3fd6603c\"]|Swap|{\"take\n#   r_address\": \"0x061e1a7ffad235cd34d5da18c75efd01c3ae7b5029cafbf9f136f74c3fd6603c\", \"sell_address\": \"0x00585c32b625999e6e5e78645ff8df7a9001cf5cf3eb6b80ccdd16cb64bd3a34\", \"sell_amount\"\n#   : 32132345679012345679, \"buy_address\": \"0x053c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8\", \"buy_amount\": 20599329, \"beneficiary\": \"0x061e1a7ffad235cd34d5da18c75efd01c3ae7b5029cafbf9f136f74c3fd6603c\"}\n```\n\n## Development Installation\n\n```bash\ngit clone https://github.com/NethermindEth/entro\ncd entro\npoetry env use python3.12  # Can use older versions, but 12 performs much better\npoetry install --all-extras\n\n# Installing Pre-Commit\npoetry run pre-commit install\n\n# Running the Pre-Commit checks on demand\npoetry run pre-commit run --all-files\n\n# Running unit tests\npoetry run pytest tests/\n\n# Running Integration Tests --\u003e Follow instructions in docs/Installation\n```\n\n\n## CLI Help\nEach command \u0026 group has a --help flag available with details on the sub-commands and the \narguments, options \u0026 flags for each command\n```bash\n# For additional help on commands\nentro --help\n\n#  Usage: entro [OPTIONS] COMMAND [ARGS]...\n#  \n#    Command Line Interface for Nethermind Entro\n#  \n#  Options:\n#    --help  Show this message and exit.\n#  \n#  Commands:\n#    backfill\n#    decode      ABI Decoding \u0026 Event Classification\n#    get         Utilities for Fetching Data from RPC Node\n#    migrate-up  Migrate DB Tables to Latest Version\n#    prices      Backfill ERC20 Token Prices\n#    tokens      Utilities for ERC Tokens\n\nentro backfill starknet events --help\n#  Usage: entro backfill starknet events [OPTIONS]\n#  \n#    Backfill \u0026 ABI Decode StarkNet Events for a Contract\n#  \n#  Options:\n#    -rpc, --json-rpc TEXT           JSONRPC URL to use for backfilling.  If not\n#                                    provided, will use the JSON_RPC environment\n#                                    variable\n#    -db, --db-url TEXT              SQLAlchemy DB URL to use for backfilling.\n#                                    If not provided, will use the DB_URL\n#                                    environment variable\n#    -from, --from-block TEXT        Start block for backfill. Can be an integer,\n#                                    or a block identifier string like 'earliest'\n#                                    [default: earliest]\n#    -to, --to-block TEXT            End block for backfill. Can be an integer,\n#                                    or a block identifier string like 'pending'\n#                                    [default: latest]\n#    -addr, --contract-address TEXT  Contract address for event/log backfills\n#                                    [required]\n#    -abi, --decode_abis TEXT        Names of ABIs to use for Decoding.  To view\n#                                    available ABIs, run `entro list-abis`ABIs\n#                                    can be added to the database using `entro\n#                                    decoding add-abi`\n#    -e, --event-name TEXT           Event name for event/log backfills.  Can be\n#                                    input multiple times.  If not provided, will\n#                                    backfill all events present in contract-abi\n#    --batch-size INTEGER            Batch size to use for query.  When querying\n#                                    an API, the batch is usually the page size.\n#                                    For JSON RPC calls, the batch size is the\n#                                    number of blocks each query will cover.\n#    --event-file PATH               File to save event data\n#    --help                          Show this message and exit.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnethermindeth%2Fentro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnethermindeth%2Fentro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnethermindeth%2Fentro/lists"}