Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NPM publishing instructions to README #120

Merged
merged 2 commits into from
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,44 @@ $ ape run scripts/deploy_subscription_manager.py --network ethereum:local
The networks used here are standard ape networks, you can see the full list with:
```
$ ape networks list
```
```

## NPM publishing process

For interoperability, we keep an NPM package with information of deployed smart contracts, such as address, ABI, etc.

The NPM package can be found in https://www.npmjs.com/package/@nucypher/nucypher-contracts and the process to update it is as follows:

1. Download the last version of the package in a separate folder. Testnet versions end in
`-<testnet>` (e.g., `-goerli`).

```bash
$ npm i @nucypher/nucypher-contracts@x.y.z[-<testnet>]
```
2. Copy the `artifacts` folder and paste it into the nucypher-contracts local repository. Only the
files that we want to be uploaded must be kept.

3. Add the artifacts (`abi` and `address`) and the source code of the smart contract.

4. Leave only the artifacts/contracts of the Ethereum network were the contract to be added is
deployed (mainnet, Ropsten...).

5. Change the `version` field of the `package.json`. See “Versioning” section.

> If you are uploading testnet contracts, add `<testnet_name>` to the semantic version. For
> example: "version": "0.3.0-ropsten"

6. Publish the new version:

```bash
$ npm publish
```

### NPM versioning

We follow semantic versioning schema:

https://docs.npmjs.com/about-semantic-versioning

But with some changes: while the major version is 0, we always bump patch version instead of minor
version.
Loading