Skip to content

curaOS/BSCS

Repository files navigation

BSCS

Overview

This monorepo consists of

A frozen version of the cNFT contract.

A stats page powered by The Graph

Scripts used to automate repetitive tasks (currently only a script for deploying the contract)

End-to-end tests for the contract

Frontend for bscs.cura.run

Frontend for bscs.cura.run

Developement

Install

yarn install

Build commands

yarn build:website # build the website under packages/website
yarn build:subgraph # build the subgraph under packages/subgraph
yarn build:contract # build the contract under packages/contract

Deploy commands

1. Deploying the Contract

yarn deploy:contract 

This command will run deployement script from packages/scripts, this script will:

  1. Read /package.json to determine the contract address and network
  2. Create a new address and deploy the contract to it
  3. Update the version and contract address under /package.json
  4. Update the contract address under packages/subgraph/subgraph.yaml
  5. Read /metadata.json and use it to call init

2. Deploying the Subgraph

Before running this command, we need to Only update startBlock under packages/subgraph/subgraph.yaml (optional but will make indexing faster)

yarn deploy:subgraph

3. Deploying the website

That's handled via Vercel, and it uses the configs from package.json