This is the official repository for the crowdsale of Lunyr tokens.
We use SafeMath.sol and ERC20.sol from Zeppelin (thanks!)
NewToken.sol is an example of a new token that we might upgrade to.
We have 1200+ lines of tests. There are two test files:
- One tests the wallet
- The other one tests the crowd-sale token contracts.
Instructions
-------------
-2. Open a terminal
-1. Install npm
0. Clone the repository "git clone https://github.com/Lunyr/crowdsale-contracts.git"
- In the repository, run "npm install"
- Run testrpc (see below)
- In another terminal, run "truffle test"
The testrpc command we use is
testrpc --testnet --account=0x1024102410241024102410241024102410241024102410241024102410241020,10000000000000000000000000 --account=0x1024102410241024102410241024102410241024102410241024102410241021,10000000000000000000000000 --account=0x1024102410241024102410241024102410241024102410241024102410241022,10000000000000000000000000 --account=0x1024102410241024102410241024102410241024102410241024102410241023,10000000000000000000000000 --account=0x1024102410241024102410241024102410241024102410241024102410241024,10000000000000000000000000 --debug
If you don't want to run all the tests, you can just run individual ones
truffle test ./test/LunyrToken.js
If you want to test on the testnet, do the following:
- install geth "brew install geth" or "apt-get install ethereum"
- create at least 3 accounts "geth account new"
- get some test ethereum (how?)
- run geth in the terminal: "geth --testnet --rpc --rpcport 45585 --rpcaddr localhost console"
- in the geth console, unlock your default account "personal.unlockAccount(web3.eth.accounts[0])"
- in another terminal, get to the directory where you cloned the repo 'cd crowdsale-contracts/'
- run "truffle migrate --network testnet"
- run "truffle console --network testnet"
- interact with the contracts via web3