Skip to content

Hylance/EtherPunk-2021

Repository files navigation

My Dapp

This project is for the EtherPunk 2021. It contains code for the Smart Contract, web-based dapp and NodeJS server.

  • Team: Defi Degener
  • Author: Cuegod
  • Utilized Tools: Dappstarter and Covalent API

Pre-requisites

In order to develop and build "My Dapp," the following pre-requisites must be installed:

Installation

Using a terminal (or command prompt), change to the folder containing the project files and type: yarn This will fetch all required dependencies. The process will take 1-3 minutes and while it is in progress you can move on to the next step.

Yarn Errors

You might see failures related to the node-gyp package when Yarn installs dependencies. These failures occur because the node-gyp package requires certain additional build tools to be installed on your computer. Follow the instructions for adding build tools and then try running yarn again.

Build, Deploy and Test

Before you can work with Matic's testnet, you need to request some tokens in your test accounts. To make this request type: yarn faucet This will request tokens for all 10 test accounts. You may have to run this command a few times to see the token balances get updated. It isn't necessary to wait until all accounts have tokens – the account labeled (0) is the account used to deploy contracts. Once you see a balance for this account, you can continue.

Using a terminal (or command prompt), change to the folder containing the project files and type: yarn start This will run all the dev scripts in each project package.json.

File Locations

Here are the locations of some important files:

To view your dapp, open your browser to http://localhost:5000 for the DappStarter Workspace.

We ♥️ developers and want you to have an awesome experience. You should be experiencing Dappiness at this point. If not, let us know and we will help. Visit https://support.decentology.com or hit us up on Twitter @decentology.

Smart Contract

yarn migrate to compile contracts/*.sol files, deploy them to the blockchain.

Dapp

Run the dapp in a separate terminal. You must have run npm run deploy for the dapp to see most recent smart contract changes.

yarn dapp runs the dapp on http://localhost:5001 using webpack dev server

Server

Run the server in a separate terminal. You must have run npm run deploy for the dapp to see most recent smart contract changes.

yarn server runs NodeJS server app on port 5002 with NestJS. yarn start runs NodeJS server app on port 5000, 5001 and 5002.

Testing

test-config.js contains settings used by test scripts

Run tests using yarn test --script=[test file]

Production Builds

DappStarter currently does not provide blockchain migration scripts to be used in production. However, here are the scripts for generating production builds:

yarn build:prod generates dapp bundle for production.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages