Vyper: the Pythonic Programming Language for the EVM
Project description
Getting Started
See Installing Vyper to install vyper. See Tools and Resources for an additional list of framework and tools with vyper support. See Documentation for the documentation and overall design goals of the Vyper language.
See learn.vyperlang.org for learning Vyper by building a Pokémon game. See try.vyperlang.org to use Vyper in a hosted jupyter environment!
Note: Vyper is beta software, use with care
Installation
See the Vyper documentation for build instructions.
Compiling a contract
To compile a contract, use:
vyper your_file_name.vy
generate bytecode
vyper -f bytecode file-name.vy > file-name.bin
generate abi
vyper -f abi file-name.vy > file-name.abi
There is also an online compiler available you can use to experiment with
the language and compile to bytecode
and/or IR
.
Note: While the vyper version of the online compiler is updated on a regular basis it might be a bit behind the latest version found in the master branch of this repository.
Testing (using pytest)
(Complete installation steps first.)
make dev-init
python setup.py test
Developing (working on the compiler)
A useful script to have in your PATH is something like the following:
$ cat ~/.local/bin/vyc
#!/usr/bin/env bash
PYTHONPATH=. python vyper/cli/vyper_compile.py "$@"
To run a python performance profile (to find compiler perf hotspots):
PYTHONPATH=. python -m cProfile -s tottime vyper/cli/vyper_compile.py "$@"
To get a call graph from a python profile, https://stackoverflow.com/a/23164271/ is helpful.
Contributing
- See Issues tab, and feel free to submit your own issues
- Add PRs if you discover a solution to an existing issue
- For further discussions and questions, post in Discussions or talk to us on Discord
- For more information, see Contributing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file vyper-0.4.0.tar.gz
.
File metadata
- Download URL: vyper-0.4.0.tar.gz
- Upload date:
- Size: 672.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9687145c6a0bf42de52e92202ce9a913648d3c657ac8e5cfb9b35a100dc47e34 |
|
MD5 | 5b66b4315875acefed315b76a2765e0c |
|
BLAKE2b-256 | 2b09befae43f33161cf817590337f5ea12e8849e401eaaca9eeea22852ae90d1 |
File details
Details for the file vyper-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: vyper-0.4.0-py3-none-any.whl
- Upload date:
- Size: 338.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22d7e1eca229e95a909dc971ff5b1685c8379404e3fc3b7b84dbc59b5de1c262 |
|
MD5 | e0443bf14aa8924539ba4120bc5d8517 |
|
BLAKE2b-256 | 370b7c14ae8aec83187a67d8c13a4fdff9bc4d72d9ef822ec7ce026b301a00cb |