Code Monkey home page Code Monkey logo

pixelcons-invaders's Introduction

PixelCons-Invaders

Generative art NFTs utilizing the PixelCons platform. This is the whole source code including the website/app, solidity contracts, and test scripts. The app is currently being hosted on the web at https://invaders.pixelcons.io/

For a breakdown of the contract code, check out the flattened contract repo here

Setup/Run

Please follow these steps if you wish to run the PixelCon Invaders app locally or wish to run the tests

1. Clone the core repo

Clone the PixelCons-Invaders repo by downloading the zip from GitHub and extracting it or by running the following GIT command

git clone https://github.com/PixelCons/PixelCons-Invaders.git

2. Run install and compile

Run the following commands at the cloned PixelCons-Invaders directory to install dependencies and build the app (Make sure you have Node.js and Yarn installed). Once the build is complete, all data for the app can be found under the build folder

yarn install
yarn compile
yarn web_build

3. Start web server

By default, the app is already configured to point to mainnet. Start the webapp by running the following command which will host it at http://localhost:8080

npm web_start

Configuration

Please review the following configuration pieces

web3.service.js (\src\app\services)

The beginning of this service declares the networkConfig constant. The first network object in this list is considered the default target for the rest of the app (L1). The scond network object in the list defines the secondary netowrk in the system (L2). Additional helpful data pieces can be added to each network in the list (ex. fallback JSON RPCs)

const _networkConfig = [{ ... }];

market.service.js (\src\app\services)

By default, the market integration is disabled. This can be enabled and configured at the top of this service

const _enabled = false;

settings.js (\functions)

The app supports a few web functions, which help perform tasks for retrieving metadata and dynamically adding tag data for better web integration. The more advanced features are disabled by default, but can be enabled and configured from this settings file

Run the Tests

The PixelCons core project contains test scripts for verifying application integrity. Please follow these steps if you wish to run the tests yourself...

1. Run install and compile

MAke sure you have all the dependancies installed and have compiled the contracts by running the following commands (Make sure you have Node.js and Yarn installed)

yarn install
yarn compile

2. Deploy test data

Make sure you have the desired target networks properly configured in the hardhat.config.ts file, then run the following command to load test data (may take several minutes)

yarn deploy

3. Run the test script

Run the following command to start running the tests (uses hardhat configuration)

yarn test

Debug the Application

If you wish to run the app in a debuggable environment on a different network other than mainnet, please refer to the following notes

Run local ethereum testnet

You can use the deploy script to deploy the contract to local networks (L1 and L2). The local networks to deploy to is configured in the hardhat.config.ts file

yarn deploy

Run web app in debug mode

You can run the web app in a debug mode (non minified) by running the following command. Refer to the Configuration section above for how to configure the app to target your new local network instead of mainnet

yarn web_debug

pixelcons-invaders's People

Contributors

pixelcons avatar

Watchers

James Cloos avatar  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.