-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add NPM publishing instructions to README
- Loading branch information
Showing
1 changed file
with
41 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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. |