KVyper: Semantics of Vyper in K
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
common
lll-evm
scripts
tests
vyper-lll
vyper
.gitignore
.gitmodules
README.md
kvyper.py

README.md

KVyper: Semantics of Vyper in K

In this repository we present a formal semantics of Vyper. For more details, refer to wiki.

WARNING: This repository has not been independently audited for security. Use with caution.

Running KVyper

KVyper can be used to compile Vyper programs to EVM bytecode, being comparable to the production Vyper compiler.

First, build K after installing the prerequisites in k/README.md (after the first command):

$ git submodule update --init k
$ cd k
$ mvn package -DskipTests

Add the bin directory to your path:

$ export PATH="`pwd`/k-distribution/target/release/k/bin:$PATH"

Then, build KVyper:

$ kompile --syntax-module VYPER-ABSTRACT-SYNTAX vyper-lll/vyper-lll-post.k
$ kompile --syntax-module LLL-EVM-INTERFACE     lll-evm/lll-evm.k

Now you can run KVyper (Python 3.6 required):

$ python3.6 kvyper.py <pgm>.v.py

For example,

$ python3.6 kvyper.py tests/examples/token/ERC20.v.py

Contributing to KVyper

To contribute to KVyper: file issues, submit pull requests, and join the community K Riot channel, which includes a number of K experts.