Code Monkey home page Code Monkey logo

johnsage25 / crypto-wars-solidity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from e11-io/crypto-wars-solidity

0.0 0.0 0.0 8.4 MB

CryptoWars is the first strategy game to fully run on smart contracts. Build your village, summon your army, protect your e11 tokens and attack your enemies to steal theirs.

Home Page: https://cryptowars.e11.io

License: GNU General Public License v3.0

JavaScript 31.56% TypeScript 33.59% Shell 0.41% HTML 7.97% CSS 5.51% Solidity 20.96%

crypto-wars-solidity's Introduction

Crypto Wars

Build Status Coverage Status Join the chat at https://gitter.im/e11-io/crypto-wars-solidity

This repository holds all the smart contracts that are going to be used on the game Crypto Wars.

Requirements

Installation

  1. Install truffle and an ethereum client. For local development, try EthereumJS TestRPC.

    npm install -g truffle
    npm install -g ganache-cli
    truffle version
    # Truffle v4.1.11 (core: 4.1.11)
    # Solidity v0.4.24 (solc-js)
  2. Install dependencies.

    npm i # or yarn
  3. Compile the contracts.

    truffle compile
  4. Run the tests.

    npm run test
  5. Run test coverage.

    npm run coverage
  6. Run local testrpc.

    npm run rpc
  7. Migrate the contracts.

    truffle migrate
  8. a. Run the web app locally.

    npm run start # to use your local RPC network
    # Open http://localhost:4200 on your favorite web3 browser
    # Remember to switch your network on Metamask to localhost 8545
  9. b. To run the web app with the PoA e11 (311) network.

    • Console 1:
    ./scripts/full-node.sh # this will create a local full node of the e11 Proof of Authority chain (311)
    • Console 2:
    npm run start:poa # this will start the angular server with the PoA environment.
    # Remember to switch your network on Metamask to http://localhost:8311

Lastly open http://localhost:4200 and on Metamask connect to http://localhost:8311

How to migrate new contracts into e11 (311) PoA network

  • truffle migrate --network=e11

How to send e11 and ether to contributors

  • Duplicate the file src/scripts/contributors.sample.json and name it contributors.json

    • Add all the accounts you want to send to
    • Set the amount of ether and e11 you want to send
  • truffle exec ./scripts/send-testnet-tokens.js --network=e11

NOTE: This project is still a WIP, we encourage you to create a Pull Request and to participate in the ongoing discussions here.

crypto-wars-solidity's People

Contributors

e11io avatar gitter-badger 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.