Skip to main content

Vyper: the Pythonic Programming Language for the EVM

Project description

Build Status Documentation Status Discord

PyPI Docker

Coverage Status Language grade: Python

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

vyper-0.4.0rc6.tar.gz (655.5 kB view details)

Uploaded Source

Built Distribution

vyper-0.4.0rc6-py3-none-any.whl (336.7 kB view details)

Uploaded Python 3

File details

Details for the file vyper-0.4.0rc6.tar.gz.

File metadata

  • Download URL: vyper-0.4.0rc6.tar.gz
  • Upload date:
  • Size: 655.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for vyper-0.4.0rc6.tar.gz
Algorithm Hash digest
SHA256 1237877638a12e621588f0e717b9658b5ddef4dfa7b8143276963b17dd9414d0
MD5 f750d169945665ba1ff529f70e61dc8c
BLAKE2b-256 ee8ee08aef5d79fe39b2e500632628286130dc9bebd110fbeae2a9dc17c9d861

See more details on using hashes here.

File details

Details for the file vyper-0.4.0rc6-py3-none-any.whl.

File metadata

  • Download URL: vyper-0.4.0rc6-py3-none-any.whl
  • Upload date:
  • Size: 336.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for vyper-0.4.0rc6-py3-none-any.whl
Algorithm Hash digest
SHA256 ac421c84aa32e7fd66bf2b2457c11ab05f96c89f7a4d724d137f7b870bfe9a85
MD5 cc9a0d62bb02e1ff9d9cf8dcda2092b3
BLAKE2b-256 a1cd43c55a377cfd7d2513b696f3c1fd9c7e6a5fe467a3163dd0b2364fe13f42

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page