Skip to content

diginex/ICO-smart-contracts

Repository files navigation

Token Sale Smart Contracts

Overview

These Ethereum smart contracts are used by Diginex's Token Sale platform. The smart contracts support multiple sales periods over time, token locking and flexible token vesting configuration.

Usage

Follow these steps:

  1. If you want to change the smart contract template variables (such as name, symbol, etc.), you need to set the following environment variables according to your token parameters (see scripts/test.env for an example):
$ ENV_VARS_OVERRIDE=whatever
$ ERC20_NAME=Token
$ ERC20_SYMBOL=TOK
$ ERC20_DECIMALS=18

Similarly, you can import this repo into your repo as a git submodule and define these environment variables from your repo.

  1. Run scripts/build.sh to generate the *.sol contract code and the build files truffle/build/contracts/*.json.
$ scripts/build.sh

Contracts

Please see the contracts/ directory.

Develop

Contracts are written in Solidity and tested using Truffle and ganache-cli.

Dependencies

# Install local node dependencies
$ npm install

Test

# Compile all smart contracts
$ npm run build

# Run all tests
$ npm test

# Run test coverage analysis
$ npm run coverage

Docker

A Docker image to run containerized testing is provided. Requires Docker Compose.

# Build the container and run all tests
$ make build test

# Run a test for a single contract
$ docker-compose run --rm truffle npm test test/<TEST_NAME>.test.js

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages