Skip to main content

ape-ganache: Ape network provider for Ganache

Project description

ape-ganache

Ganache network provider plugin for Ape. Ganache is a tool for creating a local blockchain for fast Ethereum development.

Dependencies

  • python3 <https://www.python.org/downloads>_ version 3.7 or greater, python3-dev
  • Node.js, NPM, and Ganache. See Ganache's Installation <https://github.com/trufflesuite/ganache#command-line-use>_ documentation for steps.

Installation

via pip

You can install the latest release via pip <https://pypi-hypernode.com/project/pip/>_:

pip install ape-ganache

via setuptools

You can clone the repository and use setuptools <https://github.com/pypa/setuptools>_ for the most up-to-date version:

git clone https://github.com/ApeWorX/ape-ganache.git
cd ape-ganache
python3 setup.py install

Quick Usage

To use the plugin, first install Ganache locally into your Ape project directory:

cd your-ape-project
npm install --global ganache

After that, you can use the --network ethereum:development:ganache command line flag to use the ganache network (if it's not already configured as the default).

This network provider takes additional Ganache-specific configuration options. To use them, add these configs in your project's ape-config.yaml:

ganache:
  port: 8555

To select a random port, use a value of "auto":

ganache:
  port: auto

This is useful for multiprocessing and starting up multiple providers.

Mainnet Fork

The ape-ganache plugin also includes a mainnet fork provider. It requires using another provider that has access to mainnet.

Use it in most commands like this:

ape console --network :mainnet-fork:ganache

Specify the upstream archive-data provider in your ape-config.yaml:

ganache:
  mainnet_fork:
    upstream_provider: infura

Otherwise, it defaults to the default mainnet provider plugin. You can also specify a block_number.

NOTE: Make sure you have the upstream provider plugin installed for ape.

ape plugins add infura

Development

Please see the contributing guide to learn more how to contribute to this project. Comments, questions, criticisms and pull requests are welcomed.

License

This project is licensed under the Apache 2.0.

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

ape-ganache-0.1.0a1.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

ape_ganache-0.1.0a1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file ape-ganache-0.1.0a1.tar.gz.

File metadata

  • Download URL: ape-ganache-0.1.0a1.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for ape-ganache-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 8bcc96c17ed1c0efd07d67f924ea459b3763acb52c1c2360f976916ff116bf2c
MD5 82970a2b33fef3e7a34016503c3a48d5
BLAKE2b-256 3e99fb5017373a892cc5e273eeb73ec73ee4a6d582a308f971a20687fd6e8e5a

See more details on using hashes here.

File details

Details for the file ape_ganache-0.1.0a1-py3-none-any.whl.

File metadata

  • Download URL: ape_ganache-0.1.0a1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.9

File hashes

Hashes for ape_ganache-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e17165e4705472b68a1a13dce6a9608e6c24cb6edec6fd8949040ca3c5182cd
MD5 25e9d0c9ec195f2a1952a19a4e011b46
BLAKE2b-256 2d76a8dbeea818e6461ffe0a47bbe0412166366a293b08eb3f65f36e4f811b5a

See more details on using hashes here.

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