Skip to content
ICO Hello World example
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
migrations/contracts
src/contracts
test/contracts
.babelrc
.editorconfig
.eslintrc
.gitignore
.solcover.js
README.md
ico.cnf.json
initShell.sh
jsconfig.json
package.json
truffle.js
yarn.lock

README.md

ICO

Hello World ICO example by Validity Labs.

VSCode Plugin recommendations

We strongly recommend to use Visual Studio Code with the following plugins, because it provides the best solidity development experience and ensures compliance with our coding styleguide and rules.

Requirements

The server side scripts requires NodeJS 8. Go to NodeJS and install the appropriate version for your system.

Yarn is required to be installed globally to minimize the risk of dependency issues. Go to Yarn and choose the right installer for your system.

Depending on your system the following components might be already available or have to be provided manually:

  • Python 2.7
  • make (on Ubuntu this is part of the commonly installed sudo apt-get install build-essential)
  • On OSX the build tools included in XCode are required

General

Before running the provided scripts, you have to initialize your current terminal via source ./initShell.sh for every terminal in use. This will add the current directory to the system PATH variables and must be repeated for time you start a new terminal window from project base directory.

cd <project base directory>
source ./initShell.sh

Every command must be executed from within the projects base directory!

Setup

Open your terminal and change into your project base directory. From here, install all needed dependencies.

cd <project base directory>
source ./initShell.sh
yarn install

This will install all required dependecies in the directory node_modules.

Compile, migrate and run unit tests

To deploy the ICO smart contracts, go into the projects root directory, and change into the truffle development console.

cd <project base directory>
source ./initShell.sh
yarn run dev

Now you can compile, migrate and run tests.

# Compile contract
compile

# Migrate contract
migrate

# Test the contract
test

The development console will automatically start it's own TestRPC server for you!

Because the tests may consumes a lot of ETH, please restart the development console between each test!

Run the coverage test

To run the coverage tests, go into the projects root directory and run the coverage test like that.

cd <project base directory>
source ./initShell.sh
yarn run coverage

The coverage test will automatically start it's own TestRPC server for you!

You can’t perform that action at this time.