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

Feature/of 459 improve contract tooling record facet deployments for each #148

Conversation

nup9151f
Copy link
Contributor

@nup9151f nup9151f commented Dec 17, 2024

Description

This PR adds version information to Facets. A new script has been added to save this information to a new file.

Changes

Facets now have functions facetVersion and facetName to return the new hardcoded version information. Currently in case of changes in the contract this version information has to be updated manually.

All facets versions is currently set to "1.0.0"

New script FacetVersions queries all facets in Registry and stores version information in a new json file. We can not use Proxy and Readable contracts to get all facets because Proxy contracts need to be initialized with the Registry address before we can call facetAddresses() function.

To execute new script: make facet-versions

New json follows same naming pattern than current "deployed" files: <chain_id>[-staging].versions.json

Example:

{
  "Facets": {
    "Registry": {
      "selectors": [
        "0x2c408059",
        "0x91423765",
        "0x1f931c1c",
        "0x7a0ed627",
        "0xadfca15e",
        "0x52ef6b2c",
        "0xcdffacc6",
        "0x01ffc9a7",
        "0x8da5cb5b",
        "0x8ab5150a",
        "0xf2fde38b",
        "0x79ba5097"
      ],
      "address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512",
      "version": "-"
    },
    "ERC721LazyDropFacet": {
      "version": "1.0.0",
      "address": "0x4ed7c70F96B99c776995fB64377f0d4aB3B0e1C1",
      "selectors": [
        "0x225a2b3e",
        "0xd9854a88",
        "0xf56cfb66",
        "0x22ba9456",
        "0x70ad0183"
      ]
    },
    ......
    "ChargeFacet": {
      "selectors": [
        "0x10c3db96",
        "0x23d3a539",
        "0x9eaa34ec",
        "0x20ecd1ec"
      ],
      "version": "1.0.0",
      "address": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f"
    }
  }
}

Type of Change

Please check the boxes that apply to your pull request:

  • New feature (non-breaking change which adds functionality)

@nup9151f nup9151f added the enhancement New feature or request label Dec 17, 2024
@nup9151f nup9151f self-assigned this Dec 17, 2024
Copy link

changeset-bot bot commented Dec 17, 2024

⚠️ No Changeset found

Latest commit: daed2d7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@george-openformat george-openformat left a comment

Choose a reason for hiding this comment

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

Awesome this is looking great!

Just one thing with the storage layout.

src/facet/ChargeFacet.sol Outdated Show resolved Hide resolved
src/facet/ERC20FactoryFacet.sol Outdated Show resolved Hide resolved
src/facet/ERC721FactoryFacet.sol Outdated Show resolved Hide resolved
src/facet/ERC721LazyDropFacet.sol Outdated Show resolved Hide resolved
src/facet/RewardsFacet.sol Outdated Show resolved Hide resolved
src/facet/SettingsFacet.sol Outdated Show resolved Hide resolved
@nup9151f nup9151f merged commit 9191cb6 into staging Dec 19, 2024
2 checks passed
@nup9151f nup9151f deleted the feature/of-459-improve-contract-tooling-record-facet-deployments-for-each branch December 19, 2024 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants