Using Vyper to write smart contracts
Vyper is a new programming language that compiles to EVM bytecode. It is an experimental language developed with the goal of increasing simplicity, security, and auditability. Vyper also includes additional features such as overflow checking, decimal fixed-point numbers, support for more data types, and much more.
In this recipe, you will learn to write better smart contracts using Vyper and its new features.
Getting ready
Vyper can only be built if you have Python 3.6 or higher installed in your system. It is also recommended to set up a virtual Python environment so that package installments are isolated. Run the following commands to create a Python environment:
virtualenv -p python3.6 --no-site-packages ~/vyper-venv source ~/vyper-venv/bin/activate
How to do it...
- Run the following command to download and install
vyper
from its GitHub repository:
git clone https://github.com/ethereum/vyper.git cd vyper make make test
- After installation, verify it by compiling...