{"id":18499155,"url":"https://github.com/moonstream-to/moonworm","last_synced_at":"2025-10-13T09:30:23.172Z","repository":{"id":39861977,"uuid":"404076313","full_name":"moonstream-to/moonworm","owner":"moonstream-to","description":"codegen for crypto degens and other ethereum smart contract toolkit for python","archived":false,"fork":false,"pushed_at":"2024-07-31T09:01:51.000Z","size":467,"stargazers_count":38,"open_issues_count":31,"forks_count":7,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-09-24T02:16:24.612Z","etag":null,"topics":["blockchain","codegen","defi","eth-brownie","ethereum","hacktoberfest","python","smart-contracts","solidity","web3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moonstream-to.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2021-09-07T18:03:44.000Z","updated_at":"2025-08-25T17:00:38.000Z","dependencies_parsed_at":"2024-07-31T10:17:20.009Z","dependency_job_id":null,"html_url":"https://github.com/moonstream-to/moonworm","commit_stats":null,"previous_names":["moonstream-to/moonworm","bugout-dev/moonworm"],"tags_count":47,"template":false,"template_full_name":null,"purl":"pkg:github/moonstream-to/moonworm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstream-to%2Fmoonworm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstream-to%2Fmoonworm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstream-to%2Fmoonworm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstream-to%2Fmoonworm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moonstream-to","download_url":"https://codeload.github.com/moonstream-to/moonworm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moonstream-to%2Fmoonworm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014521,"owners_count":26085536,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blockchain","codegen","defi","eth-brownie","ethereum","hacktoberfest","python","smart-contracts","solidity","web3"],"created_at":"2024-11-06T13:44:52.027Z","updated_at":"2025-10-13T09:30:22.755Z","avatar_url":"https://github.com/moonstream-to.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## What is moonworm?\n\nMoonworm is a set of tools that helps you develop/analyze blockchain dapps. Pump your productivity to the Moon.\n\n### Tools:\n\n1. `moonworm watch` -  Tool to monitor and crawl(index) decoded smart contract data. It gets you historic/on going smart contract’s decoded `events` and `transactions`. No sweat, just provide `abi` and smart contract’s address and get stream of data. With this tool you can: analyze  incidents, set up alerting, build datasets, write sniping bots, etc.\n2. `moonworm generate-brownie` - Brownie on steroids. Generate python interface and cli for your smart contracts in “one click”, focus on smart contract development, `moonworm` will do the rest. In addition, you will have syntax highlights which will boost your speed on writing tests.\n![moonworm](https://user-images.githubusercontent.com/19771534/164013435-74a9e816-74ef-4e05-a7e5-1f7f620896e7.jpg)\n3. `moonworm generate` - cli/ python interface generator for pure `web3` library. In case you prefer not to use `brownie`\n\n## Setup:\n\n```bash\npip install moonworm\n```\n\n## Guides\n\n- [How to `watch`](./docs/how-to-watch.md) - How to use `moonworm watch` to get data about smart contract\nactivity.\n\n## Usage:\n\n### `moonworm watch`:\n\n```bash\nmoonworm watch --abi \u003cPath to abi file\u003e --contract \u003cContract address\u003e --web3 \u003cWeb3 provider url\u003e --start \u003cStart block\u003e --end \u003cEnd block\u003e\n```\n\nArguments:\n\n- `--abi/-i ABI`    Path to abi file\n- `--contract/-c CONTRACT` Contract address\n- `--web3/-w WEB3`    Web3 provider uri\n- `--start/-s START`  block to start watching\n\nOptional args:\n- `--end/-e END`      block to stop crawling, if not given, crawler will not stop\n- `--poa` Flag for `PoA` networks, for example `polygon`\n- `--confirmations CONFIRMATIONS`  Number of confirmations to set for watch. (Default 12)\n- `--outfile/-o OUTFILE`  `JSONL` file into which to write events and transactions\n- `--db`  Use Moonstream database specified by `MOONSTREAM_DB_URI` to get blocks/transactions. If set, need also provide `--network`\n- `-network {ethereum,polygon}`Network name that represents models from db. If the `--db` is set, required\n- `--only-events` Flag, if set: only watches events. Default=`False`\n- `--min-blocks-batch MIN_BLOCKS_BATCH` Minimum number of blocks to batch together. Default=100\n- `--max-blocks-batch MAX_BLOCKS_BATCH` Maximum number of blocks to batch together. Default=1000 **Note**: it is used only in `--only-events` mode\n-\n\n### `moonworm generate-brownie`:\n\n```bash\nmoonworm generate-brownie -p \u003cPath to brownie project\u003e -o \u003cOutdir where file will be generated\u003e -n \u003cContract name\u003e\n```\n\nArguments:\n\n- `--project/-p PROJECT`  path to brownie project.\n- `--outdir/-o OUTDIR` Output directory where files will be generated.\n- `--name/-n NAME` Prefix name for generated files\n\n**NOTE**: For better experience put generated files in sub directory of your brownie project. As an example:\n\n1. `cd myBrownieProject`\n2. `moonworm generate-brownie -p . -o generated/ -n MyContract`\n\n      3. Run the generated cli of the contract: `python3 generated/Mycontract.py -h`\n\n### `moonworm generate`:\n\n```bash\nmoonworm generate --abi \u003cPath to abi\u003e -o \u003cOutdir\u003e --interface --cli --name \u003cPrefix name for the generated files\u003e\n```\n\nArguments:\n\n- `--abi/-i ABI` Path to contract abi JSON file\n- `--outdir/-o OUTDIR` Output directory where files will be generated.\n- `--interface` Flag to generate python interface for given smart contract abi\n- `-name/-n NAME` Prefix name for generated files\n- `--cli` Flag to generate cli for given smart contract abi\n\n\n\n## FAQ:\n\n- Ser, is it safe to use?\n\n     Yes, it is. moonworm is a code generator that generates code that uses brownie/web3.\n\n- Ok ser, are there examples of usages?\n\n     [moonstream-dao contracts](https://github.com/bugout-dev/dao/tree/main/dao), [lootbox contract](https://github.com/bugout-dev/lootbox/tree/main/lootbox)\n\n- But ser, I don’t write on python\n\n     Javascript version (hardhat) is coming soon\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoonstream-to%2Fmoonworm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoonstream-to%2Fmoonworm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoonstream-to%2Fmoonworm/lists"}