CryptoBlades / cryptoblades
- четверг, 22 июля 2021 г. в 00:30:21
99999999
(or some other high number so you can deploy).You should now have 100 fake eth! You're now fake rich.
npm install
.env
in the 'frontend' directory alongside .env.mainnet
and .env.testnet
Edit this file to include the following lines of codenpm 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 testsnpm 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- rm -rf build/