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
Please follow these steps if you wish to run the PixelCon Invaders app locally or wish to run the tests
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
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
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
Please review the following configuration pieces
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 = [{ ... }];
By default, the market integration is disabled. This can be enabled and configured at the top of this service
const _enabled = false;
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
The PixelCons core project contains test scripts for verifying application integrity. Please follow these steps if you wish to run the tests yourself...
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
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
Run the following command to start running the tests (uses hardhat configuration)
yarn test
If you wish to run the app in a debuggable environment on a different network other than mainnet, please refer to the following notes
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
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