Compiling smart contract with neo3-boa

Getting Started

Neo3-Boa is a powerful tool that allows you to compile Python files for the Neo blockchain.

Here’s a concise guide to help you get started.

Compiling using the Command Line

To compile a Python file using the command line, execute the following command in your terminal:

Make sure your .py file is not empty and that the functions are callable.

Utilizing a Python Script

Alternatively, you can compile the Python file using a script. Here is a Python script snippet that you can use to compile and save your file:

Enabling Debug Mode

To debug a smart contract, compile it using the debug flag (-db). Here is how you can do it:

Checking the Results

After the compilation is complete, a new file with the .nef extension and a manifest file will be generated in the same directory as your Python file. If you compiled it in debug mode, a .nefdbgnfo debug file will also be generated in the project’s folder.

Smart ContractCompileNeo3-boa