Giter Club home page Giter Club logo

ico-maker's Introduction

ICO Maker

Build Status Coverage Status

Smart Contracts to build your ICO solution and issue your ERC20 Token.

Prerequisites

Install truffle.

npm install -g truffle      // Version 4.1.14+ required.

Create your Smart Contracts folder and init truffle

mkdir MyICO
cd MyICO 
truffle init

Install

npm install ico-maker

Usage

BaseToken.sol

BaseToken is an ERC20 token with a lot of stuffs like Capped, Mintable, Burnable and ERC1363 Payable Token behaviours.

pragma solidity ^0.4.24;

import "ico-maker/contracts/token/BaseToken.sol";


contract MyToken is BaseToken {
  constructor(
    string _name,
    string _symbol,
    uint8 _decimals,
    uint256 _cap
  )
  BaseToken(_name, _symbol, _decimals, _cap)
  public
  {}
}

Contributions.sol

Contributions is an utility Smart Contract where to store additional data about crowdsale like the wei contributed or the token balance of each address.

pragma solidity ^0.4.24;

import "ico-maker/contracts/crowdsale/utils/Contributions.sol";


contract MyContributions is Contributions {}

BaseCrowdsale.sol

BaseCrowdsale is an extensible Crowdsale contract with Timed and Capped behaviours.

pragma solidity ^0.4.24;

import "ico-maker/contracts/crowdsale/BaseCrowdsale.sol";


contract MyCrowdsale is BaseCrowdsale {
  constructor(
    uint256 _openingTime,
    uint256 _closingTime,
    uint256 _rate,
    address _wallet,
    uint256 _cap,
    uint256 _minimumContribution,
    address _token,
    address _contributions
  )
  BaseCrowdsale(
    _openingTime,
    _closingTime,
    _rate,
    _wallet,
    _cap,
    _minimumContribution,
    _token,
    _contributions
  )
  public
  {}
}

Bounty.sol

Bounty is a Capped Smart Contract to mint and distribute tokens for bounty programs.

pragma solidity ^0.4.24;

import "ico-maker/contracts/distribution/Bounty.sol";


contract MyBounty is Bounty {
  constructor(address _token, uint256 _cap)
  Bounty(_token, _cap)
  public
  {}
}

Airdrop.sol

Airdrop is a Smart Contract to distribute tokens for airdrop.

pragma solidity ^0.4.24;

import "ico-maker/contracts/distribution/Airdrop.sol";


contract MyAirdrop is Airdrop {
  constructor(address _token, address _wallet)
  Airdrop(_token, _wallet)
  public
  {}
}

Development

Install truffle.

npm install -g truffle      // Version 4.1.14+ required.

Install dependencies

npm install

Linter

Use Solium

npm run lint:sol

Use ESLint

npm run lint:js

Use both and fix

npm run lint:fix

Compile and test the contracts.

Open the Truffle console

truffle develop

Compile

compile 

Test

test

Optional

Install the truffle-flattener

npm install -g truffle-flattener

Usage

truffle-flattener contracts/token/BaseToken.sol >> dist/BaseToken.dist.sol

License

Code released under the MIT License.

ico-maker's People

Contributors

vittominacori avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.