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.
- Open a terminal
- Install npm
- 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
orapt-get install ethereum
- create at least 3 accounts
geth account new
- get some test ether from http://faucet.ropsten.be:3001
- 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
Or just use our existing contracts on the testnet:
Multisig Wallet: 0x90321a0b97ee9cdf78c2428ae826b8a0e6c7af8a
Lunyr Token: 0x6c6c2747e3753654f7654b566888417c135fe9cc