Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Deneum Token and Crowdsale (ICO) contracts

Build Status

Denim Ethereum contracts suite consists of

  • Deneum token (DNM) - the coin supposed to be the main digital asset in Deneum application;
  • Crowdsale contract - emits DNMs to investors during Private sale, pre-ICO and ICO phases.

Token contract

DNM is ERC-20 standard token with the following paramaters:

Crowdsale contract

Contract-crowdsale for Deneum project. It receives ethers and sends back corresponding amount of DNM tokens. Token price depends on the current phase (see the schedule). The crowdsale contract contains a list of phases, each phase has a start time, end time and token price in USD cents.
minPurchaseUSDc is the minimal amount of purchase in USD cents. If current time doesn't match any phase or transferred value less than minPurchaseUSDc the operation is thrown (reverted).

Crowdsale schedule (preliminary)

Phase Ph.Name Start date (UTC) Start Unix End date (UTC) End Unix Price, USD Cap, DNM Cap, USD
0 Private 2018-04-02 07:30:15 1522654215 2018-05-25 14:00:00 1527256800 2.95 450,000 1,327,500
1 Pre-ICO not configured yet not config not configured yet not config 5.65 900,000 5,085,000
2 ICO not configured yet not config not configured yet not config 8.90 10,000,000 89,000,000

Crowdsale schedule modification

The internal phases schedule can be changed at any time by the owner with the following methods:

addPhase(_startDate, _endDate, _priceUSDcDNM, _tokensCap)

Price oracle

TBD: to use external price source In-contract ETH price is kept up to date by external Oracle contract containing current ETH price. Contract owner can change price source at any time with



All the funds received from the investors are forwarded to securely stored wallet (Externally Owned Account) to avoid any on-chain risks. Wallet can be changed at any point of time by the owner.


Getting started

Get the source code

Clone the contracts repository with submodules (we use zeppelin-solidity libraries)

git clone --recurse-submodules

Test it

To be sure in code quality and compatibility we use truffle framowork for testing our code:

Run truffle tests

  • Install truffle framework on your host. It will install solc-js compiler automatically.
  • Run testrpc in one console and leave it open.
  • Start the new console and type truffle test.

Deploy on the net

  • Flatten your solidity code The simplest way to move your code to the IDE and other tools is to make it flat (opposed to hierarchically organized files) Install truffle-flattener via npm npm install -g truffle-flattener and flatten your crowdsale contract to a single code snippet, copy it truffle-flattener contracts/LongevityCrowdsale.sol You can use Remix IDE for deployment on the net.

  • Deploy Token contract, you should get an address of deployed contract (Token)

  • As Tx get mined go to the etherscan and do Token's source code verification
  • Deploy Crowdsale contract
deploy Crowdsale(wallet, Token, oracle)

where wallet is external address to receive depisited ethers, token is the token contract deployed on previous step and oracle is external oracle service.

  • Add/Del Phases
addPhase(_startDate, _endDate, _priceUSDcDNM, _tokensCap)
  • Add Crowdsale contract to the minters of the token

Post-Deploy steps

  • Good practice is to verify Source Code on the etherscan. Do it for both Crowdsale and Token.
  • Publish your Crowdsale contract for investors.

After crowdsale end

After the last phase ends you can disconnect Crowdsale from the token (remove minting privileges given before).


Post-ICO state

  • the token is still mintable. To continue minting you should add new minter.



Token and Crowdsale contracts for Deneum DNM project



No releases published


No packages published