mmsaki / woke-template

setup template for woke testing framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting started with woke 3.4.2

  1. Setup python environment with Python 3.7 and above

    python -m venv venv
    source ./venv/bin/activate
    pip install woke numpy pandas scipy
  2. Create Counter contract in contracts/

  3. Create deploy scripts in scripts/

Local deployment with anvil

  1. Setup configuration in woke.toml

    # ./woke.toml
    [testing]
    cmd = "anvil"
  2. Run anvil in terminal as our node

    anvil
  3. Set up woke accounts, recommended to import with private key from your anvil accounts

    woke accounts import ALIAS=deployment
  4. Generate pytypes

    woke init pytypes
  5. Deploy contract

    woke run scripts/deploy.py

Fuzzing and Testing

  1. Create tests in tests/

  2. Run tests

    woke test tests/test_counter.py
    
    # or
    
    woke test
  3. Run fuzzer

    woke fuzz

Importing library

You can use npm install to add @openzeppelin/contracts or @uniswap/v3-core etc.

pnpm i @openzeppelin/contracts @uniswap/v3-core

Add/import contract in contracts/Imports.sol

About

setup template for woke testing framework


Languages

Language:Python 69.3%Language:Solidity 28.2%Language:JavaScript 2.4%