Skip to content

Commit

Permalink
Add NPM publishing instructions to README
Browse files Browse the repository at this point in the history
  • Loading branch information
manumonti committed Sep 19, 2023
1 parent 8c2d46d commit cbc5a8f
Showing 1 changed file with 41 additions and 1 deletion.
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

When a new smart contract is deployed it is needed to add to NPM package:

https://www.npmjs.com/package/@nucypher/nucypher-contracts

1. Download the last version of the package in a separated folder. Ropsten versions end in
`-ropsten`.

```bash
$ npm i @nucypher/[email protected][-ropsten]
```
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.

0 comments on commit cbc5a8f

Please sign in to comment.