HackMoney 2020 Hackathon Project
Group Members: Alex Fisher, Wade Kimbrough, Kevin Vitale
Prerequisites/Versions I've used:
- Ubuntu 18.04, Windows 10
- VSCode 1.44.2 (w/ extensions: solidity 0.0.72, Solidity Contract Flattener 0.0.7, Solidity Visual Auditor 0.0.24)
- Node v10.20.1
- npm 6.14.5
- truffle v5.1.24 (
npm install -g truffle
) - ganache-cli v6.9.1 (
npm install -g ganache-cli
)
To get the project running:
-
Download git repo locally and optionally Open folder in Visual Studio
-
Terminal #1 - Install project dependencies
npm install
- Terminal #1 - Run ganache-cli in deterministic mode on port 8545
ganache-cli -d
- Terminal #2 - Start truffle, compile/migrate the project to the blockchain
truffle console --network develop
truffle(develop)>migrate --reset
- Terminal #3 - Install dependencies and run the react front-end at http://localhost:3000
cd app
npm install
npm run start
- Start Ganache-cli (terminal 1):
ganache-cli -f https://mainnet.infura.io/v3/3b0206f022a6462cacf91dc79e2b9833 -m "myth like bonus scare over problem client lizard pioneer submit female collect" -i 999
- Connect on Truffle and deploy (terminal 2):
truffle console --network mainnetfork
migrate
- Start web app (terminal 3):
cd app
npm run start
- Configure Metamask:
Seed with the same mnemonic as you used in ganache-cli, and change network to use localhost:8545 and Network ID 999.
Create a secrets.json
file in the project root (same level as truffle-config.js). It should contain a mnemonic (you can generate via ganache/ganache-cli) and infura API Key (sign-up for free at infura.io)
{
"mnemonic": "iron skate call erode fly crunch spirit minute cloth advice horse smooth",
"infuraApiKey": "3b0206f022a6462cacf91dc79e2b9833"
}
Then, be sure to start truffle using:
truffle console --network kovan
Also support for ropsten
, but it has been very slow lately. Like, Bitcoin slow.
And, in your browser be sure to switch Metamask to Ropsten and seed it with the correct mnemonic (Logout and Restore).