/vyral

Vyral campaign management contracts

Primary LanguageJavaScript

Vyral

Smart contracts for Vyral crowdsale.

Vyral is based on the idea that the spread of information in the social network happens through contagion model in which users do not explicitly exert effort i.e., a user is more likely to be "infected" with an idea if more of her neighbors are.

  • VyralSale.sol Driver contract that runs presale and crowdsale. Presale begins Dec 2, 2017 11 am EST and runs for 23 days. Crowdsale will be initialized after presale ends.
  • Campaign.sol Campaign manager contract that keeps track of the Referral tree and sends rewards for new referrals.
  • Share.sol Standard ERC20 token with some added logic to make it compatible with the referral mechanisms.
  • Vesting.sol A wallet with vesting logic that keeps track of registered vesting schedules and unlocks tokens over time for team and partners.
  • PresaleBonuses.sol Library contract that calculates the bonus rewards during the presale phase of the sale.

These contracts implement referral mechanism used in Vyral.

Development

Clone this repository including submodules:

git clone --recursive git@github.com:vyralnetwork/vyral.git

NOTE: Tell git not to track secrets.json and truffle.js like so:

$ git update-index --assume-unchanged secrets.json truffle.js

Install NPM dependencies (local and global):

$ npm install
$ npm install -g web3@0.19.1 ethereumjs-testrpc truffle 

Run TestRPC in one shell and run Truffle tests in another.

$ testrpc -u0 -u1 -u2 -u3 -u4 -u5
$ truffle develop
truffle(develop)> migrate
truffle(develop)> test

Testnet

Add private key or mnemonic to secrets.json and deploy to testnet:

$ truffle migrate --network rinkeby