Git Product home page Git Product logo

vyper-crowdsale's Introduction

Vyper Crowdsale Contracts

Welcome to Vyper Crowdsale contracts.

You will find several Vyper crowdsale contract implementations in this project. We've also ported some Open Zeppelin tests with minimum changes.

Before You Clone This Repository ...

This project requires the the following dependencies to be present before you can actually start developing and contributing to this repository.

Prerequisites

  • Python3
  • NodeJS
  • Truffle
  • Ganache

Since Vyper compiler is a beta software, there could be some breaking changes in the future. We, therefore, strongly encourage you to keep a close eye on the official Vyper documentation if things go south.

Setting up the Development Environment

Clone the Project

Since you've already installed the dependencies, you can now clone the project from GitHub.

cd path/to/a/desired/directory
git clone http://github.com/binodnp/vyper-crowdsale
cd vyper-crowdsale

Create a Virtual Environment

virtualenv -p python3 --no-site-packages env
source env/bin/activate

Clone and Make Vyper

git clone https://github.com/ethereum/vyper.git
cd vyper
make
make test

If you see some error messages here, you might have missed to activate the virtual environment. Type:

source env/bin/activate

Restore NPM Packages

NPM is needed to write and run truffle tests (in JavaScript of course).

npm install

How to's?

How to Run Vyper to Build a Contract?

On the project root, type the following in the terminal:

vyper ./contracts/crowdsale.v.py

The above command will compile the burnable token contract.

What does Truper Actually Do?

Instead of using Vyper, you could use truper to compile contracts and generate the build outputs to the build directory. This helps you write, run, and migrate truffle tests in JavaScript.

Note that for truper to work properly, Vyper contract files must end with .v.py file extension(s). Also note that truper will generate the build artifacts (files) to have .vyper.json extension.

Open the terminal panel and type truper to build contracts.

Truffle Tests

Open the terminal panel and type truffle test to see the test results.

Please note that you would need to first compile the contracts using the command truper before you can run your tests.

Contracts

  • Crowdsale
  • Allowance Crowdsale
  • Capped Crowdsale
  • Increasing Price Crowdsale
  • Individually Capped Crowdsale
  • Minted Crowdsale
  • Timed Crowdsale
  • Whitelisted Crowdsale
  • Post Delivery Crowdsale

License

Apache 2.0

Additional Links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.