Metadata-Version: 2.4
Name: vyper
Version: 0.5.0a1
Summary: Vyper: the Pythonic Programming Language for the EVM
Home-page: https://github.com/vyperlang/vyper
Author: Vyper Team
Author-email: 
License: Apache License 2.0
Keywords: ethereum evm smart contract language
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11,<4
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cbor2<6,>=5.4.6
Requires-Dist: pycryptodome<4,>=3.5.1
Requires-Dist: packaging>=23.1
Requires-Dist: lark<2,>=1.0.0
Requires-Dist: wheel
Requires-Dist: immutables
Provides-Extra: test
Requires-Dist: pytest<9.0,>=8.0; extra == "test"
Requires-Dist: pytest-cov<5.0,>=4.1; extra == "test"
Requires-Dist: pytest-instafail<1.0,>=0.4; extra == "test"
Requires-Dist: pytest-xdist<3.4,>=3.0; extra == "test"
Requires-Dist: pytest-split<1.0,>=0.7.0; extra == "test"
Requires-Dist: eth_abi<6.0.0,>=5.0.0; extra == "test"
Requires-Dist: py-evm>=0.12.1b1; extra == "test"
Requires-Dist: lark==1.1.9; extra == "test"
Requires-Dist: hypothesis[lark]<7.0,>=6.0; extra == "test"
Requires-Dist: eth-stdlib==0.2.7; extra == "test"
Requires-Dist: eth-account==0.12.2; extra == "test"
Requires-Dist: setuptools; extra == "test"
Requires-Dist: hexbytes>=1.2; extra == "test"
Requires-Dist: pyrevm>=0.3.2; extra == "test"
Provides-Extra: lint
Requires-Dist: black==23.12.0; extra == "lint"
Requires-Dist: flake8==6.1.0; extra == "lint"
Requires-Dist: flake8-bugbear==23.12.2; extra == "lint"
Requires-Dist: flake8-use-fstring==1.4; extra == "lint"
Requires-Dist: isort==5.13.2; extra == "lint"
Requires-Dist: mypy==1.19; extra == "lint"
Provides-Extra: docs
Requires-Dist: Pygments==2.18.0; extra == "docs"
Requires-Dist: shibuya==2024.1.17; extra == "docs"
Requires-Dist: sphinx==7.2.6; extra == "docs"
Requires-Dist: sphinx-copybutton==0.5.2; extra == "docs"
Requires-Dist: sphinx-reredirects==0.1.5; extra == "docs"
Provides-Extra: dev
Requires-Dist: vyper[docs,lint,test]; extra == "dev"
Requires-Dist: ipython; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pyinstaller; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

<img src="https://raw.githubusercontent.com/vyperlang/vyper/master/docs/logo.svg?sanitize=true" alt="" width="110">

[![Build Status](https://github.com/vyperlang/vyper/actions/workflows/test.yml/badge.svg)](https://github.com/vyperlang/vyper/actions/workflows/test.yml)
[![Documentation Status](https://readthedocs.org/projects/vyper/badge/?version=latest)](http://docs.vyperlang.org/en/latest/?badge=latest "ReadTheDocs")
[![Discord](https://img.shields.io/discord/969926564286459934.svg?label=%23vyper)](https://discord.gg/6tw7PTM7C2)
[![Telegram](https://img.shields.io/badge/Vyperholics🐍-Telegram-blue)](https://t.me/vyperlang)
[![Twitter](https://img.shields.io/twitter/follow/vyperlang)](https://x.com/vyperlang)

[![PyPI](https://badge.fury.io/py/vyper.svg)](https://pypi.org/project/vyper "PyPI")
[![Docker](https://img.shields.io/docker/cloud/build/vyperlang/vyper)](https://hub.docker.com/r/vyperlang/vyper "DockerHub")

[![Coverage Status](https://codecov.io/gh/vyperlang/vyper/branch/master/graph/badge.svg)](https://codecov.io/gh/vyperlang/vyper "Codecov")
[![Language grade: Python](https://github.com/vyperlang/vyper/workflows/CodeQL/badge.svg)](https://github.com/vyperlang/vyper/actions/workflows/codeql.yml)

# Getting Started
See [Installing Vyper](http://docs.vyperlang.org/en/latest/installing-vyper.html) to install vyper.
See [Tools and Resources](https://docs.vyperlang.org/en/latest/resources.html) for an additional list of framework and tools with vyper support.
See [Documentation](http://docs.vyperlang.org/en/latest/index.html) for the documentation and overall design goals of the Vyper language.

See [learn.vyperlang.org](https://learn.vyperlang.org/) for **learning Vyper by building a Pokémon game**.
See [try.vyperlang.org](https://try.vyperlang.org/) to use Vyper in a hosted jupyter environment!

**Note: Vyper is constantly evolving, use with care and understand the risks associated with smart contract development.**

# Installation
See the [Vyper documentation](https://docs.vyperlang.org/en/latest/installing-vyper.html)
for build instructions.

# Compiling a contract
To compile a contract, use:
```bash
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](https://vyper.online/) 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.**

# 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](https://github.com/vyperlang/vyper/discussions) or talk to us on [Discord](https://discord.gg/6tw7PTM7C2)
* For more information, see [Contributing](http://docs.vyperlang.org/en/latest/contributing.html)

## Contributing Code

### Setup

#### uv (recommended)

Make sure you have `uv` installed

1. Clone this repo and `cd` into it
2. Run `git fetch --tags git@github.com:vyperlang/vyper.git` to get the tags necessary for version inference
3. Run `uv sync`
4. Run `source .venv/bin/activate` to activate the virtual environment
5. Run `vyper --version` to verify the setup

#### pip

Make sure you have `pip`, `setuptools`, and `pytest` installed

1. Clone this repo and `cd` into it
2. Run `git fetch --tags git@github.com:vyperlang/vyper.git` to get the tags necessary for version inference
3. Run `python -m venv .venv` to create a virtual environment
4. Run `source .venv/bin/activate` to activate it
5. Run `make init` to install the main dependencies
6. Run `make dev-init` to install the dev dependencies
7. Run `vyper --version` to verify the setup

### Commands

* `vyper path/to/file.vy` to run your local copy of the compiler
* `pytest` to test your changes
    Useful pytest flags:
        * `-x`: Fail test run on first test failure
        * `--instafail`: Show reason for test failure directly, instead of at the end of a test run
        * `--disable-warnings`: Hide warnings which occurred during tests
* `make mypy` to type check your changes
* `make lint` to check your files are correctly formatted (also runs mypy)

### Other Tips

#### Checking performance

To run a python performance profile (to find compiler perf hotspots):
```bash
PYTHONPATH=. python -m cProfile -s tottime vyper/cli/vyper_compile.py "$@"
```

The utility timer functions `timeit`, `profileit` and `cumtimeit` are available in `vyper/utils.py`.

#### Getting call graph

To get a call graph from a python profile, install `gprof2dot` and `xdot`, and run it like `gprof2dot -f pstats stats | xdot -`. (See https://stackoverflow.com/a/23164271/).

#### Testing with hevm

Install hevm by downloading it from the releases page (https://github.com/ethereum/hevm/releases/latest) and making sure it is in your PATH. hevm tests can be enabled with `--hevm` flag, and hevm tests can be selected with the `-m hevm` marker. For instance, `pytest -m "hevm" --hevm`.

#### Fuzzing tests

Fuzzing test are very slow, so they are not run by default.
To run them, use `pytest -m "fuzzing"`.
