This repo contains a truffle framework project and GRON digital smart contracts.
- Install/build Ganache
- Install Truffle - be sure version
4.0.4
or above is installed. - Install Node version
8
and above.
brew install node # mac os only
npm install -g truffle
npm install -g ethereumjs-testrpc
#
testrpc # start ganache / test-rpc
# in a seprate terminal
truffle compile # compiles smart contracts
truffle migrate # deploys smart contracts to test-rpc
truffle test # run unit tests
MyEtherWallet deployment enables deployment without the need for running and syncrhonising a network node. Instead, contract deployments are handled by submitting a REST API call to a community node such as EtherScan.io.
The following steps describe the manual deployment steps:
- Preparation:
- Create a funding wallet and make sure it has sufficient ether for contract deployments
- Create a control wallet
- Run
truffle compile
to build the GRO and GROVesting contracts. This will generate files json files that contain ABI and byteCode data for each contract. - Calculate the priceNumerator (10000)
- Calculate the starting block for the funding rounds
- Calculate the end block for the funding rounds
- Deployment steps (using the funding wallet):
- Select the appropriate network in the top right of the MyEtherWallet app
- Deploy the GRO contract using the GRO contract bytecode, found in the
GRO.json
build file. - Copy the GRO deployed contract address
- Use the GRO contract ABI, found in
GRO.json
, to call the GRO initialiseContract method - Deploy the Vesting contract using the Vesting contract bytecode found in the
GROVesting.json
build file. - Copy the Vesting deployed contract address
- Use the Vesting contract ABI, found ing
GROVesting.json
, to call the initialiseContract method - Call the
setVestingContract
method in the GRO contract using the new Vesting contract address