

GitHub - CryptoBlades/cryptoblades
source link: https://github.com/CryptoBlades/cryptoblades
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

CryptoBlades
Currency Setup
- 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.
Frontend Setup
npm install
- Create a new file named
.env
in the 'frontend' directory alongside.env.mainnet
and.env.testnet
Edit this file to include the following lines of code 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
VSCode Setup
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 Environment Variables
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
Structure
contracts
contains the solidity contracts for the gamefrontend
contains the Vue code for the frontendmigrations
contains migration filestest
contains tests
Commands
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
Errors
- 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/
Recommend
-
195
Calcflow A Virtual Reality Tool for Mathematical Modeling! The repository contains the open-sourced code to Calcflow, a powerful mathematical visualization tool designed to give students, educators, and engineers a better grasp on...
-
217
Release 5.0 · javaee/glassfish · GitHub ...
-
465
README.md ViaBTC Exchange Server ViaBTC Exchange Server is a trading backend with high-speed performance, designed for cryptocurrency exchanges. It can...
-
204
Pytorch Exercises Pytorch is one of the most popular deep learning libraries as of 2017. One possible way of familiarizing yourself with it, I think, is to practice with simple quizzes. That's where this project comes in. The outline will...
-
113
Bytom Official golang implementation of the Bytom protocol. Automated builds are available for stable releases and the unstable master branch. Binary archives are published at
-
338
Welcome to tmux! tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattach...
-
181
-
380
惊鸿一瞥 这是一个可以帮助你在命令行中完成Github的各种操作的cli工具。 创建它的初衷是因为我是一个命令行狂热爱好者,与此同时我也是一个Github的fans,每当我在命令行环境中进行开发工作时,如果此时我想看看Github上又诞生了什么新的有趣的开源项
-
6
2021-07-29 09:03 增长势头超越Axie,异军突起的链游新星CryptoBlades是何来历? 本文系PINCapital 原创文章,未经授权严禁转载,转载请与后台联系,以下为正文部分:在这个加密通证普遍不景气的夏天,区块链游戏成为...
-
8
NFT Game CryptoBlades User Numbers Elevated by 1,966% June 20, 2022
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK