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

New protocol-deployments package - separate versioning of contracts from publishing deployment updates #305

Merged
merged 14 commits into from
Nov 1, 2023

Conversation

oveddan
Copy link
Collaborator

@oveddan oveddan commented Oct 26, 2023

Created new package protocol-deployments

  • deployment scripts for 1155 contracts have been moved from 1155-contracts to this new package
  • deployed 1155 contract addresses have been moved from 1155-contracts to this new package.

Problem this solves:

  • every time we deployed a contract and want to to publish the changes in a package we had to bump the contract version, since we require the package version to match the contract version.

With this change, we can version the contracts independently from the deployed addresses.

You can see this in action in the upstream branch "Deploy zora sepolia" where we deployed the contracts to the new Zora Sepolia chain, and just bumped the protocol-deployments version without needing to bump the 1155-contracts version.

  • The 1155-contracts wagmi generator now just generates abis to bundle in the package json.
  • The protocol-deployments wagmi generator imports the abis from 1155-contracts and bundles them with the deployed addresses.
  • premint-sdk imports from protocol-deployments to get contract abis and addresses from it

@oveddan oveddan mentioned this pull request Oct 26, 2023
@oveddan oveddan changed the base branch from exit-pre-mode to prerelease_premint_api_helper October 27, 2023 18:05
@oveddan oveddan force-pushed the separate-deploy-package branch from dd57509 to 3c1992b Compare October 27, 2023 18:05
@oveddan oveddan mentioned this pull request Oct 27, 2023
@oveddan oveddan changed the base branch from prerelease_premint_api_helper to main October 30, 2023 23:11
@oveddan oveddan force-pushed the separate-deploy-package branch from 3c1992b to 4594a5d Compare October 30, 2023 23:11
@oveddan oveddan changed the base branch from main to fix-premint-sdk-publish October 30, 2023 23:19
@oveddan oveddan force-pushed the separate-deploy-package branch from 4594a5d to d85a071 Compare October 30, 2023 23:19
@oveddan oveddan changed the title Create new deployment package Deployment Oct 30, 2023
@oveddan oveddan changed the title Deployment extract package for deployed contract addresses Oct 30, 2023
Copy link
Collaborator Author

@oveddan oveddan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo:

  • add readme to protocol-deployments with examples

@oveddan oveddan force-pushed the separate-deploy-package branch from ca30120 to 5753fda Compare October 31, 2023 21:55
@oveddan oveddan changed the title extract package for deployed contract addresses New protocol-deployments package - separate versioning of contracts from publishing package containing addresses where they are deployed Nov 1, 2023
@oveddan oveddan changed the title New protocol-deployments package - separate versioning of contracts from publishing package containing addresses where they are deployed New protocol-deployments package - separate versioning of contracts from publishing deployment updates Nov 1, 2023
@iainnash
Copy link
Collaborator

iainnash commented Nov 1, 2023

Would be great to create folders to separate the scripts. Given the complexity of the deployment what are your thoughts on creating different packages for each project deployments with a standard pattern?

@kulkarohan
Copy link
Contributor

Would be great to create folders to separate the scripts. Given the complexity of the deployment what are your thoughts on creating different packages for each project deployments with a standard pattern?

yeah maybe imports could be project specific ? eg@zoralabs/protocol-deployments/1155-contracts, @zoralabs/protocol-deployments/721-contracts

@oveddan
Copy link
Collaborator Author

oveddan commented Nov 1, 2023

Merge activity

  • Nov 1, 5:27 PM: @oveddan started a stack merge that includes this pull request via Graphite.
  • Nov 1, 5:28 PM: Graphite rebased this pull request as part of a merge.
  • Nov 1, 5:29 PM: @oveddan merged this pull request with Graphite.

@oveddan oveddan changed the base branch from fix-js-build-task to main November 1, 2023 21:27
@oveddan oveddan force-pushed the separate-deploy-package branch from d554799 to c19731f Compare November 1, 2023 21:28
@oveddan
Copy link
Collaborator Author

oveddan commented Nov 1, 2023

Would be great to create folders to separate the scripts. Given the complexity of the deployment what are your thoughts on creating different packages for each project deployments with a standard pattern?

yeah maybe imports could be project specific ? eg@zoralabs/protocol-deployments/1155-contracts, @zoralabs/protocol-deployments/721-contracts

sounds good will do this in a v2

@oveddan oveddan merged commit b62e471 into main Nov 1, 2023
5 checks passed
iainnash pushed a commit that referenced this pull request Jan 11, 2024
… from publishing deployment updates (#305)

Created new package `protocol-deployments`

* deployment scripts for 1155 contracts have been moved from `1155-contracts` to this new package
* deployed 1155 contract addresses have been moved from `1155-contracts` to this new package.

Problem this solves:
* every time we deployed a contract and want to to publish the changes in a package we had to bump the contract version, since we require the package version to match the contract version.

With this change, we can version the contracts independently from the deployed addresses.

You can see this in action in the upstream branch "Deploy zora sepolia" where we deployed the contracts to the new Zora Sepolia chain, and just bumped the `protocol-deployments` version without needing to bump the `1155-contracts` version.

* The `1155-contracts` wagmi generator now just generates abis to bundle in the package json.
* The `protocol-deployments` wagmi generator imports the abis from `1155-contracts` and bundles them with the deployed addresses.
* `premint-sdk` imports from `protocol-deployments` to get contract abis and addresses from it
@iainnash iainnash deleted the separate-deploy-package branch January 11, 2024 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants