This repository contains the Solidity source code for the smart contarcts for the crowdsale and the ERC-20 GRAPE token. The development environment is based on truffle.
- Open your favorite Terminal
- Install npm
- Clone the project and install the dependencies
$ git clone https://github.com/GrapevineWorld/crowdsale-contracts.git
$ cd crowdsale-contracts
$ npm install
The contracts can be tested and used using npm commands:
Command | Description |
---|---|
npm run migrate |
compiles and deploys the contracts |
npm run test |
tests the contracts using ganache-cli |
npm run coverage |
generates the coverage of the tests |
npm run console |
launches the truffle console |
npm run lint |
lints the js files |
npm run lint:fix |
lints and fixes the js files |
npm run lint:sol |
lints the solidity files |
npm run lint:sol:fix |
lints and fixes the solidity files |
npm run lint:all |
lints the js and solidity files |
npm run lint:all:fix |
lints and fixes the js and solidity files |
If you want to test on the testnet, do the following:
- install geth
$ brew install geth
- create at least 4 accounts
$ geth account new
- Get some test ether from https://faucet.rinkeby.io/
- Run geth, unlocking the accounts:
$ geth --rinkeby --rpc --rpcport 8545 --rpcapi db,eth,net,web3,personal --unlock="0,1,2"
The accounts will be respectively: the owner of the contracts, the crowdsale wallet and a token buyer.
- Run the following command to deploy contracts
$ npm run migrate:testnet
- Run the following command to buy test grapes.
$ npm run console:testnet
*The contracts are audited by Venture Boost and the reports can be found under the audit directory.
- Abdallah Miladi [email protected] - github.com/abmiladi
- Massimiliano Masi [email protected] - github.com/mascanc