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 version 3.7.2 or greater, python3-dev
  • Node.js, NPM, and Ganache. See Ganache's Installation documentation for steps.

Installation

via pip

You can install the latest release via pip:

pip install ape-ganache

via setuptools

You can clone the repository and use 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.4.0a1.tar.gz (20.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ape-ganache-0.4.0a1.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for ape-ganache-0.4.0a1.tar.gz
Algorithm Hash digest
SHA256 8d4ce0705359298630a8538612b6df2bf44dab3bd6a3bead77af5ac711eabc1a
MD5 63c81ab4a16d7664a758d918aa1f49a1
BLAKE2b-256 073291f60f86b240a841b46304eeafceaad252f70a37194ee7867f68142d5fc2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ape_ganache-0.4.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.3 readme-renderer/35.0 requests/2.28.1 requests-toolbelt/0.9.1 urllib3/1.26.11 tqdm/4.64.0 importlib-metadata/4.12.0 keyring/23.7.0 rfc3986/2.0.0 colorama/0.4.5 CPython/3.8.13

File hashes

Hashes for ape_ganache-0.4.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c5d4fceda69e93601c194242f56ee7adf3009b3a33fdb93d52ff86ea4dc07dc
MD5 bab508fa741865acb785edb0d86a86c5
BLAKE2b-256 f1d938aa4fa249dea84c067151073fc9cd40558e29e9667dc908e9500adabadb

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