Skip to content

The monorepo for the Purpose Bound Money (PBM) smart contracts and websites.

Notifications You must be signed in to change notification settings

GovTechSG/cbdc-purpose-bound-money

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose Bound Money (PBM)

Project Orchid:
Purpose Bound Money (PBM)

🔗 Website: pbm.money

Introduction

The Purpose Bound Money (PBM) proposes a protocol for the use of digital money under specified conditions. As part of a wider pilot in Project Orchid, this version of the protocol releases escrow payments automatically after a specified period. Visit pbm.money for more information on the key features.

Setup

yarn install

Packages

This repository is a monorepo of the source files, including the smart contracts, implemented for the PBM protocol.

Package Description Actual Site
@pbm/contracts Smart contracts used for the PBM token
@pbm/app The Web3 application frontend for interacting with the smart contracts Link
@pbm/web The main website at pbm.money homepage Link

Getting Started

Smart Contract Deployments

The following tasks have been implemented using Hardhat for both deploying the smart contracts to the blockchain and verifying them.

Task Name Description
deploy:pbm Deploy PBM token
deploy:vault Deploy PBM vault
dsgd:mint Mint underlying asset token (for testing)
verify:pbm Verify PBM token
verify:pbm:proxy Verify PBM token proxy
verify:vault Verify PBM vault
verify:vault:proxy Verify PBM vault proxy
Usage
yarn hardhat <task-name> --network <network> --<arg-name> <arg-value>

Start Application Frontend

Production mode

yarn build:app && yarn start:app

Development mode

yarn start:app:dev

Start Main Website

Production mode

yarn build:web && yarn start:web

Development mode

yarn start:web:dev

Run Smart Contract Tests

yarn test:contracts:coverage

Continuous Integration/Deployment

The CI pipeline is setup to deploy to a staging and production environment based on their branches, staging and main, respectively.

Staging Environment

Please raise an issue on Github to request for access to the staging environment if needed.