Skip to main content

What is moonworm?

Moonworm is a set of tools that helps you develop/analyze blockchain dapps. Pump your productivity to the Moon.

Tools:

  1. 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.
  2. 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. moonworm
  3. moonworm generate - cli/ python interface generator for pure web3 library. In case you prefer not to use brownie

Setup:

pip install moonworm

Guides

  • How to watch - How to use moonworm watch to get data about smart contract activity.

Usage:

moonworm watch:

moonworm watch --abi <Path to abi file> --contract <Contract address> --web3 <Web3 provider url> --start <Start block> --end <End block>

Arguments:

  • --abi/-i ABI Path to abi file
  • --contract/-c CONTRACT Contract address
  • --web3/-w WEB3 Web3 provider uri
  • --start/-s START block to start watching

Optional args:

  • --end/-e END block to stop crawling, if not given, crawler will not stop
  • --poa Flag for PoA networks, for example polygon
  • --confirmations CONFIRMATIONS Number of confirmations to set for watch. (Default 12)
  • --outfile/-o OUTFILE JSONL file into which to write events and transactions
  • --db Use Moonstream database specified by MOONSTREAM_DB_URI to get blocks/transactions. If set, need also provide --network
  • -network {ethereum,polygon}Network name that represents models from db. If the --db is set, required
  • --only-events Flag, if set: only watches events. Default=False
  • --min-blocks-batch MIN_BLOCKS_BATCH Minimum number of blocks to batch together. Default=100
  • --max-blocks-batch MAX_BLOCKS_BATCH Maximum number of blocks to batch together. Default=1000 Note: it is used only in --only-events mode

moonworm generate-brownie:

moonworm generate-brownie -p <Path to brownie project> -o <Outdir where file will be generated> -n <Contract name>

Arguments:

  • --project/-p PROJECT path to brownie project.
  • --outdir/-o OUTDIR Output directory where files will be generated.
  • --name/-n NAME Prefix name for generated files

NOTE: For better experience put generated files in sub directory of your brownie project. As an example:

  1. cd myBrownieProject

  2. moonworm generate-brownie -p . -o generated/ -n MyContract

    1. Run the generated cli of the contract: python3 generated/Mycontract.py -h

moonworm generate:

moonworm generate --abi <Path to abi> -o <Outdir> --interface --cli --name <Prefix name for the generated files>

Arguments:

  • --abi/-i ABI Path to contract abi JSON file
  • --outdir/-o OUTDIR Output directory where files will be generated.
  • --interface Flag to generate python interface for given smart contract abi
  • -name/-n NAME Prefix name for generated files
  • --cli Flag to generate cli for given smart contract abi

FAQ:

  • Ser, is it safe to use?

    Yes, it is. moonworm is a code generator that generates code that uses brownie/web3.

  • Ok ser, are there examples of usages?

    moonstream-dao contracts, lootbox contract

  • But ser, I don’t write on python

    Javascript version (hardhat) is coming soon

Release files for moonworm 0.9.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moonworm 0.9.3
File Size Uploaded
moonworm-0.9.3.tar.gz 83.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moonworm 0.9.3
File Interpreter ABI Platform
moonworm-0.9.3-py3-none-any.whl Python 3 none any Details

Total release size: 190.2 kB

Release files / moonworm-0.9.3.tar.gz

Download URL moonworm-0.9.3.tar.gz
Size 83.7 kB
Tags Source
SHA-256 checksum
How to use checksums
970982a9a7288c638d6c71f37b7ed0c9265c2fdbe1aecb109cb4fc7c07ab7252
BLAKE2b-256 checksum
How to use checksums
04db7bf959f10b516f17903f9399b5945b39a691f520845d7d68c7d8b7f306cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.18

Release files / moonworm-0.9.3-py3-none-any.whl

Download URL moonworm-0.9.3-py3-none-any.whl
Size 106.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57a0e7dc6204e5d9c85f781261d3ed515beaf40acadf7507409a2a409a1a018e
BLAKE2b-256 checksum
How to use checksums
a89c6f80ac245249ab26c47f3058c3869428498dd9ba642541730660f27f9cad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.18

Release history Release notifications | RSS feed

This release

0.9.3 This release

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page