A Neo3-boa project template.
Start by installing the required packages inside requirements.txt
using pip install -r requirements.txt
. We
recommend creating a virtual environment to isolate your Python environment.
├── smart_contracts - This folder contains all smart contracts for this template.
│ └── hello_world.py
├── unit_tests - This folder contains a testcase subclassing unittest.TestCase to test the smart contracts.
│ └── test_hello_world.py
├── venv - A venv folder to keep your packages isolated from your base environment.
├── .gitignore - Will ignore Python and Neo3-boa autogenerated files, and IDE folders.
├── default.neo-express - Neo-Express blockchain network instance file.
├── README.md
└── requirements.txt - Contains the name of the python packages needed to compile the smart contract and run the unit tests.
Install NeoExpress requirements and NeoExpress.
This repository already has a .neo-express
file, with two wallets named admin
and user
.
Now, you can either test manually by running NeoExpress directly, or you can write a Python script that imports
NeoTestRunner
. On the unit_tests
folder, you'll find that the classes that inherit TestCase
already
come with a NeoTestRunner
object implemented. Check out the Neo3-boa documentation
for more information on how to invoke methods and assert the results using NeoTestRunner
.