Giter Club home page Giter Club logo

cryptoblades's Introduction

CryptoBlades

Currency Setup

  1. Install Ganache.
  2. For Ganache, choose Quickstart Ethereum.
  3. Increase the gas limit in the workspace to 99999999 (or some other high number so you can deploy).
  4. Install MetaMask.
  5. Create a new connection to connect to Ganache with these settings: http://localhost:7545, any name, any chain id
  6. In Ganache, click the key icon on the right side of any address and grab the private key.
  7. 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

  1. npm install
  2. mv .env.local .env (copy the example env to your local so it can be used)
  3. npm run contract:prepare (this builds your contracts)
  4. npm run contract:deploy (this deploys your contracts to your local blockchain)
  5. npm run start:frontend

For Windows developers experiencing errors follow these steps:

  1. rm -r build
  2. npm run contract:prepare (this builds your contracts)
  3. rm -r build/contracts
  4. npm run contract:deploy
  5. 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 game
  • frontend contains the Vue code for the frontend
  • migrations contains migration files
  • test contains tests

Commands

  • npm run start:frontend - start up a server for the Vue frontend
  • npm run lint - run lint checking for all modules
  • npm run contract:prepare - extract the ABI and re-compile Truffle contracts
  • npm 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/

cryptoblades's People

Contributors

raymond-h avatar seiyria avatar poshdan avatar kcper avatar brian-man avatar newb23 avatar sarimash avatar nizzypal avatar wintersummermint avatar bilbolprime avatar alistairstpierre avatar github-actions[bot] avatar ertsybot avatar giovanny-ds avatar crypto-smoke avatar nyawmeowww avatar steart avatar pohika avatar denzanitized93 avatar ed3ath avatar viruspowaa avatar vthomas13 avatar tepn11 avatar miles003 avatar kamda-cyrial avatar devinep52 avatar vdaisson avatar osvanicolina avatar nardsqq avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.