truper

0.0.2 • Public • Published

Truper

A simple tool to compile vyper contracts to truffle compatible artifacts.

This is a somewhat hacky approach to working with vyper in truffle. You need to have the vyper compiler installed and available in your terminal's environment. If you can't run $ vyper -h this tool will be useless to you.

This is a bit of a stop-gap, as truffle will likely include this functionality in the future.

Installation

npm i -g truper

Usage

Compile all .v.py files found in ./contracts or an immediate child directory:

$ truper

Compile all .v.py files in a specified directory:

$ truper /path/to/contracts

The compiled output is always written to ./build/contracts.

If the contract file name was myContract.v.py, the compiler output will be written to myContract.vyper.json.

Importing for use in Truffle tests

const MyContract = artifacts.require('myContract.vyper');

The contract can then be used in truffle just as any other solidity contracts compiled by truffle, (though I have not tested with migrations at all).

Readme

Keywords

none

Package Sidebar

Install

npm i truper

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

4.22 kB

Total Files

3

Last publish

Collaborators

  • maurelian