Skip to content

maurelian/truper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deprecated

Truper solved a temporary need so I could learn Vyper by translating existing solidity contracts and reuse the test suites for quick feedback. It's probably not compatible with recent versions of Truffle.

Try this: https://github.com/truffle-box/vyper-example-box


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.json.

Importing for use in Truffle tests

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

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).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published