Skip to content

Commit

Permalink
updated development instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
oveddan committed Jun 29, 2023
1 parent 97035e1 commit a45f142
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 12 deletions.
25 changes: 13 additions & 12 deletions DEPLOYING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
# Deploying to a new chain
# Development/Deploying workflow

## Development workflow

1. Open a PR with changes
2. Run `npx changeset` to generate a new changeset
3. If changes are approved and merged, a github action will open a PR "Version Packages" and create a corresponding branch `changeset-release/changeset`
4. If a deployment of the contracts should to be done that would affect the deployed contract addresses, checkout the branch `changeset-release/changeset`,
*follow the deployment steps below,* commit changes, and push that branch, which will contain the updated deployed addresses.
5. Merge the PR "Version Packages" to master, which will trigger a github action to publish the new packages to npm.

## Deploying to a new chain

### 1. Setup `chainConfigs` file.

Expand Down Expand Up @@ -38,14 +49,4 @@ Use your own RPC configuration variables

Copies new addresses over to `addresses` folder:

node js-scripts/copy-latest-deployment-addresses.mjs deploy

### 4. Published abis and new addresses node package.

Create a new changeset relase:

yarn changeset

Then publish the new package:

yarn publish
node js-scripts/copy-latest-deployment-addresses.mjs deploy
51 changes: 51 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
## Deploying to a new chain

### 1. Setup `chainConfigs` file.

Use `1.json` for reference. We are ordering keys alphabetically.

```
{
# owner of the factory contract – owner to allow upgrading public factory
"FACTORY_OWNER": "0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0",
# upgrade gate for existing deployed 721 contracts owner – this address gates upgrades allowed
"FACTORY_UPGRADE_GATE_OWNER": "0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0",
# mint fee amount in wei (0 is valid)
"MINT_FEE_AMOUNT": 777000000000000,
# recipient for above mint fee
"MINT_FEE_RECIPIENT": "0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0",
# subscription market filter address for operator filter registry.
# can be set to 0 to disable. see: https://github.com/ProjectOpenSea/operator-filter-registry
"SUBSCRIPTION_MARKET_FILTER_ADDRESS": "0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6",
# subscription market filter owner address.
"SUBSCRIPTION_MARKET_FILTER_OWNER": "0x9AaC739c133074dB445183A95149880a2156541A",
# pre-approved transfer helper for ZORA v3, likely should be 0 on new networks
"ZORA_ERC721_TRANSFER_HELPER": "0x909e9efE4D87d1a6018C2065aE642b6D0447bc91"
}
```

### 2. Deploy forge script

forge script script/Deploy.s.sol --broadcast --verify --rpc-url $ETH_RPC

For example, to deploy on optimism goerli, this is the forge command:

forge script script/Deploy.s.sol --rpc-url https://goerli.optimism.io --verify --etherscan-api-key ${ETHERSCAN_OPTISM_API_KEY} --broadcast --interactives 1

Use your own RPC configuration variables

### 3. Copy new chain configuration for deployment

Copies new addresses over to `addresses` folder:

node js-scripts/copy-latest-deployment-addresses.mjs deploy

### 4. Published abis and new addresses node package.

Create a new changeset relase:

yarn changeset

Then publish the new package:

yarn publish

0 comments on commit a45f142

Please sign in to comment.