0.3.21 • Published 1 year ago

@symfoni/cbdc-contracts v0.3.21

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

Smart contracts for the Norges Bank CBDC sandbox

Disclaimer

This a sandbox project and not intended for production; use at your own risk.

Running locally

Installation

The repository may be cloned locally and installation triggered as follows.

git clone git@github.com:nahmii/nb-sandbox-contracts.git
cd nb-sandbox-contracts
npm install --ignore-scripts

NOTE: The reason for installing with the --ignore-scripts option is first and foremost to prevent the post-install script of package @consensys/universal-token from running. For the usage of @consensys/universal-token as dependency in this project the execution of postinstall is obsolete.

Compilation

The smart contract code base may be compiled with

npm run compile

Testing

In order to take the smart contracts for a test drive you may invoke

npx hardhat test --parallel

Development

To run development environment with hardhat Cmd + Shift + P and select Tasks: Run Task and select dev.

Build NPM package

To release NPM package, do

  • Cmd + Shift + P,
  • select Tasks: Run Task and
  • select release

:warning: Send updated .env vars to other deployers. It is important to ensure that all deployers of this project have the latest version of the .env variables. This is because the release updates the addresses to the contracts and it is crucial that everyone has the same information. Please share the contents of the .env file with other deployers through chat or any other preferred method of communication. This will help ensure that everyone is working with the most up-to-date information and that the deployment process runs smoothly.

Alternatively, you can use terminal:

NPM package is used to distribute the smart contract types and contract address instances to other projects e.g. dsp-wallet.

In order to build a NPM package for the smart contracts you may invoke

npx hardhat generate-npm-package

This is automatically invoked as part of the npm hardhat deploy-all --network […] and npx hardhat release (all networks) command.

Use in local development

Edit package.json dependency of your repot to point to this repo. Like this (one level up), if the two projects foleders reside side by side.

    "@symfoni/cbdc-contracts": "file:../cbdc-sandbox-contracts-shared",
0.3.20

1 year ago

0.3.17

1 year ago

0.3.16

1 year ago

0.3.15

1 year ago

0.3.14

1 year ago

0.3.12

1 year ago

0.3.21

1 year ago

0.3.10

1 year ago

0.3.19

1 year ago

0.3.18

1 year ago

0.3.9

1 year ago

0.3.6

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.5

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago