Kudos Token Contracts
Kudos is a rewards and performance driven currency built on top of the Ethereum blockchain. Kudos is the fastest and easiest way to rate and equitably reward both users and workers. By leveraging the blockchain to achieve complete transparency, Kudos restores trust in ratings through cryptographically verified transactions that cannot be manipulated by ads or algorithms.
The Kudos token contracts are written in Solidity and tested using truffle and testrpc.
# install truffle and testrpc packages globally
$ npm install -g truffle ethereumjs-testrpc
# install local node dependencies in project directory
$ npm install# run testrpc instance (make sure no other ethereum clients are running)
$ ./scripts/testrpc.sh
# run smart contract tests
$ truffle test# run solidity-coverage tool
$ ./scripts/coverage.sh
# view report at ./coverage/index.html-
deploy the KudosToken contract with
truffle deploy -
move the
stash/3_deploy_tokensalecontract.jsmigration script to themigrationsfolder -
in the
migrations/3_deploy_tokensalecontract.jsfile:-
specify the wallet address that will receive ETH in the crowdsale in the
walletvariable -
specify the address of the deployed token contract in the
tokenContractAddressvariable
-
-
deploy the KudosTokenSale contract with
truffle deploy -
fund the crowdsale contract with the Kudos tokens created in step 1 (the amount should match the value of the
amountOfTokensForSalevariable in the KudosTokenSale contract)for example, in
truffle console:
> KudosToken.deployed().then(function(instance) { token = instance});
> KudosTokenSale.deployed().then(function(instance) { sale = instance});
> token.transfer(sale.address, web3.toWei('4000000000', 'ether'));- whitelist users for each tier with the
registerTier1UsersandregisterTier2Usersfunctions, remove users from the whitelist with theunregisterUsersfunction
