The Wayback Machine - https://web.archive.org/web/20220928101125/https://github.com/tserg/vyro
Skip to content

tserg/vyro

main
Switch branches/tags
Code

Vyro

A Vyper to Cairo transpiler, inspired by Warp from Nethermind, and with a dash of Brownie.

This repository has not been audited or formally verified. Please use with caution.

As this is a work in progress, there are numerous Vyper types (e.g. structs, static arrays, dynamic arrays) and features that are not supported yet. Some features are also not capable of being supported on StarkNet. In these cases, the transpiler will throw an error.

Installation

Prequisites

Python

Vyro requires Python 3.9. Follow the instructions to install the latest version of python for your platform in the python docs

Virtual Environment

We recommend working within a virtual environment whenever using Python for projects. Instructions for setting up a virual enviornment for your platform can be found in the python docs

Dependencies

Once you have your virtual environment set up and running, install Vyro with the following command:

pip install .[dev]

Usage

Transpile

To transpile a file, run the following command in your console:

vyro transpile FILENAME.vy

To print the output to console, run:

vyro transpile FILENAME.vy --print-output

To write the output to a file, run:

vyro transpile FILENAME.vy --output FILENAME.cairo

Transform

To compile a Vyper file and print the Vyper AST to console, run the following command in your console:

vyro transform FILENAME.vy

Testing (using Ape Framework)

To run the test suite, run the following command in your console:

ape test

To log the test output to console while running the test suite, run the following command in your console:

ape test -s

Contributing

You are most welcome to contribute! Feel free to submit a PR for improvements, bug fixes or to add a new feature.

About

Vyro - Vyper to Cairo transpiler for the Ethereum and StarkNet ecosystems.

Topics

Resources

License

Stars

Watchers

Forks