Skip to main content

Interact with blockchains and smart contracts using the command line

Project description

Interact with blockchains and smart contracts using the command line.

Build on web3client, the Swiss-army knife of the blockchain.

Install

pip3 install -U web3cli

Examples

  • List all supported networks (blockchains):

    web3 network list
    
  • Get the network that is currently active

    web3 network get
    

Settings

Settings are read from the configuration file ~/.web3cli/config/web3cli.yaml, or from environment variables. (The symbol ~ refers to the home folder of your user.) See the example configuration file for a list of available settings.

Environment variables

All settings can be overridden via environment variables. For example, the settings web3cli.default_network can be overridden by setting the env variable WEB3CLI_DEFAULT_NETWORK:

WEB3CLI_DEFAULT_NETWORK=avalanche web3 network get

output> avalanche

Folder-specific settings

To have settings that apply only to the current folder, create a web3cli.yaml file in that folder. Settings specified in web3cli.yaml will override those in your home folder. Environment variables will still get the precedence.

Contribute ❤️

Pull requests are welcome!

  1. Install and configure PDM:
    curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
    
  2. Install dependencies:
    pdm install
    
  3. To run the CLI against your changes:
    pdm web3client
    
  4. To run tests:
    pdm test
    

TODO

  • Autocomplete
  • Allow to add networks
  • Command structure
  • Chech ETH balance
  • Interactive vs non-interactive mode

Project details


Release history Release notifications | RSS feed

This version

0.1.6

Download files

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

Source Distribution

web3cli-0.1.6.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

web3cli-0.1.6-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

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