twig

A tool for Ethereum smart contract development.

Contents

Overview

Start your own Vyper project

Twig lets you write tests using web3.py and pytest-ethereum against your Vyper smart contracts.

Twig setup
  • clone twig repo
  • python -m venv venv (note: requires >=python3.6)
  • . venv/bin/activate
  • pip install -e .
Project setup

Note

contracts/name_registry.vy and tests/test_name_registry.py have been included as examples on how to get started, but are safe to delete.

@pytest.fixture
def my_contract_package(deployer):
    # returns an ethpm.Package instance loaded with a "my_contract" deployment on the ethpm.Package.w3 instance
    return deployer.deploy("my_contract")

@pytest.fixture
def my_contract(my_contract_package):
    # returns an my_contract web3.contract instance to test against
    return my_contract_package.deployments.get_instance("my_contract")

Release Notes

v0.1.0-alpha.1

  • Launched repository, claimed names for pip, RTD, github, etc

Indices and tables