- Install Ganache.
- For Ganache, choose Quickstart Ethereum.
- Increase the gas limit in the workspace to
99999999
(or some other high number so you can deploy). - Install MetaMask.
- Create a new connection to connect to Ganache with these settings: http://localhost:7545, any name, any chain id
- In Ganache, click the key icon on the right side of any address and grab the private key.
- In MetaMask, create a new account, import from private key, and paste the key in there.
You should now have 100 fake eth! You're now fake rich.
npm install
mv .env.local .env
(copy the example env to your local so it can be used)npm run contract:prepare
(this builds your contracts)npm run contract:deploy
(this deploys your contracts to your local blockchain)npm run start:frontend
For Windows developers experiencing errors follow these steps:
rm -r build
npm run contract:prepare
(this builds your contracts)rm -r build/contracts
npm run contract:deploy
npm run start:frontend
If you're using VSCode, we recommend these extensions: Auto Rename Tag, EditorConfig for VSCode, Eslint, Github Pull Requests, Gitlens, Javascript and Typescript, Live Share, Solidity, Typescript Hero, Vetur
Truffle also supports some environment variables, if you create a .env
file in the root you can specify:
ETH_DEV_RPC_HOST
ETH_DEV_RPC_PORT
ETH_DEV_RPC_NETWORK_ID
ETH_DEV_RPC_GAS
BINANCE_WALLET_MNEMONIC
contracts
contains the solidity contracts for the gamefrontend
contains the Vue code for the frontendmigrations
contains migration filestest
contains tests
npm run start:frontend
- start up a server for the Vue frontendnpm run lint
- run lint checking for all modulesnpm run contract:prepare
- extract the ABI and re-compile Truffle contractsnpm run contract:deploy
- deploy the Truffle contracts for testing
- If you run into any error at all during the build process you may need to reset Ganache by deleting previous workspaces and going through the Ganache setup process again including importing a new account for Metamask.
- Artifacts are from different compiler runs
- rm -rf build/