dApp Launchpad
  • Introduction
    • About
    • Quickstart
  • Workflow
    • Frontend
    • Smart contracts
  • Commands
    • init
    • dev
    • deploy
    • list
      • scaffold-templates
    • generate
      • smart-contracts-config
  • Contributing
    • Building from source
    • Developing on local
    • Reporting bugs / Feature requests
  • FAQs
Powered by GitBook
On this page
  • Installation
  • Initialise a new project
  • Set up environment variables
  • WalletConnect Project ID
  • Starting development
  • Fork existing chain locally
  • Deploying to production
  1. Introduction

Quickstart

All you need is 3 commands!

Last updated 1 year ago

Installation

Install the package globally, and the tool will be accessible anywhere.

npm install -g @polygonlabs/dapp-launchpad

Node >v16.14.x is supported, although Node v18.x.x is recommended. To easily manage different npm versions on your system, we recommend using .

Initialise a new project

To initialise a project, simply run:

dapp-launchpad init [YOUR PROJECT NAME]

This will create a new directory in your current directory, initialise a minimal DApp project inside it, then proceed to install all required packages.

By default, the scaffolded project is in javascript. To use typescript (or any other template), use option.

To get a list of available templates, run .

Set up environment variables

Set up the mandatory environment variables in both the frontend and smart-contracts sub-folders, in a .env file. Example env files are provided for each, in .env.example.

WalletConnect Project ID

To get a WalletConnect Project ID, Head over to and create a new project. This will generate a project ID which you can then use.

Starting development

To start a development environment, use:

dapp-launchpad dev

And this will start a fully integrated dev environment - a local dev blockchain and a local Frontend dev server! Any change in the code automatically updates both the frontend and the smart contracts; no manual reload is necessary!

This will also generate some funded test wallets for you in this test chain, which you can use to develop your DApp.

Fork existing chain locally

You may also start this local chain by forking any existing EVM-compatible chain. Just run:

dapp-launchpad dev -n NETWORK_NAME

To see all available options, run:

dapp-launchpad dev -h

Deploying to production

To deploy your project to production, run:

dapp-launchpad deploy -n CHAIN_NAME

This will do 2 things:

  • Deploy all your smart contracts to the selected chain, and log the deployment results.

  • Deploy your frontend to Vercel, and log the deployment URL.

To deploy only the smart contracts, run:

dapp-launchpad deploy -n CHAIN_NAME --only-smart-contracts

And to deploy only the frontend, run:

dapp-launchpad deploy -n CHAIN_NAME --only-frontend

The frontend deployment requires that smart contracts to have been deployed before. So if you are only deploying the frontend, make sure that you either:

  1. Did run the smart contracts deploy command successfully before this.

The project is divided into two parts - (inside frontend) and (inside smart-contracts).

OR, run wizard.

Frontend
Smart contracts
nvm
list scaffold-templates
WalletConnect Cloud
--template NAME
generate smart-contracts-config -e production -n NETWORK_NAME
The frontend dev server running, with your deployed app
The local test blockchain running, with your deployed contracts