Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
The neo-boa
compiler is a tool for compiling Python files to the
.avm
format for usage in the Neo Virtual Machine <https://github.com/neo-project/neo-vm/>
__ which is used to
execute contracts on the Neo Blockchain <https://github.com/neo-project/neo/>
__.
The compiler supports a subset of the Python language ( in the same way that a boa constrictor is a subset of the Python snake species)
What does it currently do ^^^^^^^^^^^^^^^^^^^^^^^^^
.avm
format for
use in the Neo Virtual Machine <https://github.com/neo-project/neo-vm>
__What will it do ^^^^^^^^^^^^^^^
Get Help or give help ^^^^^^^^^^^^^^^^^^^^^
issue <https://github.com/CityOfZion/neo-boa/issues/new>
__ if you
encounter a problem.NEO official community chatroom <https://discord.gg/R8v48YA>
__.Make sure you are using a Python 3.6 or greater virtual environment
Pip ^^^
::
pip install neo-boa
Docker ^^^^^^
This project contains a Dockerfile to batch compile Python smart contracts. Clone the repository and navigate into the docker sub directory of the project. Run the following command to build the container:
::
docker build -t neo-boa .
The neo-boa Docker container takes a directory on the host containing python smart contracts as an input and a directory to compile the .avm files to as an output. It can be executed like this:
::
docker run -it -v /absolute/path/input_dir:/python-contracts -v /absolute/path/output_dir:/compiled-contracts neo-boa
The -v (volume) command maps the directories on the host to the directories within the container.
Manual ^^^^^^
Clone the repository and navigate into the project directory. Make a Python 3 virtual environment and activate it via:
::
python3 -m venv venv
source venv/bin/activate
or, to install Python 3.6 specifically:
::
virtualenv -p /usr/local/bin/python3.6 venv
source venv/bin/activate
Then, install the requirements:
::
pip install -r requirements.txt
The compiler may be used like in the following example:
::
from boa.compiler import Compiler
Compiler.load_and_save('path/to/your/file.py')
For legacy purposes, if you wish to compile without NEP8 stack isolation functionality, you may do the following:
::
from boa.compiler import Compiler
Compiler.load_and_save('path/to/your/file.py', use_nep=False)
You can read the docs here <http://neo-boa.readthedocs.io/en/latest/>
__.
All tests are located in boa_test/test
. Tests can be run with the following command python -m unittest discover boa_test
MIT <LICENSE.md>
__.localhuman <https://github.com/localhuman>
__.Accepted at ATEMNPSjRVvsXmaJW4ZYJBSVuJ6uR2mjQU
FAQs
A Python compiler for the Neo Virtual Machine
We found that neo-boa demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.