forked from nucypher/nucypher-contracts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
21 deletions.
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 |
---|---|---|
|
@@ -4,9 +4,10 @@ Contracts from the [main NuCypher codebase](https://github.com/nucypher/nucypher | |
|
||
## Structure | ||
|
||
* `artifacts`: ABI and address of deployed contracts | ||
* `deployment`: Deployment utilities | ||
* `deployment/artifacts`: ABI and address of deployed contracts | ||
* `contracts`: Source code for contracts | ||
* `scripts`: Deployment scripts | ||
* `scripts`: Deployment and utilities scripts | ||
* `tests`: Contract tests | ||
|
||
## Installation | ||
|
@@ -25,7 +26,8 @@ pre-commit install | |
|
||
In future, we may need to set the following: | ||
|
||
* `ETHERSCAN_TOKEN`: Etherscan [API token](https://etherscan.io/apis), required to query source files from Etherscan. | ||
* `ETHERSCAN_API_KEY`: Etherscan [API token](https://etherscan.io/apis), required to query source files from Etherscan. | ||
* `POLYGONSCAN_API_KEY`: Polygonscan [API token](https://polygonscan.com/apis), required to query source files from Polygonscan. | ||
* `GITHUB_TOKEN`: Github [personal access token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line#creating-a-token), required by [py-solc-x](https://github.com/iamdefinitelyahuman/py-solc-x) when querying installable solc versions. | ||
* `WEB3_INFURA_PROJECT_ID`: Infura project ID, required for connecting to Infura hosted nodes. | ||
|
||
|
@@ -75,26 +77,11 @@ For interoperability, we keep an NPM package with information of deployed smart | |
|
||
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`). | ||
1. Run the deployment scripts. | ||
|
||
```bash | ||
$ npm i @nucypher/[email protected][-<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" | ||
2. Change the `version` field of the `package.json`. See “Versioning” section. | ||
|
||
6. Publish the new version: | ||
3. Publish the new version: | ||
|
||
```bash | ||
$ npm publish | ||
|