feat(story-nft): make StoryBadgeNFT
upgradeable
#111
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces upgradability for
StoryBadgeNFT
through the beacon proxy pattern and renamesStoryNFTFactory
toOrgStoryNFTFactory
for clarity and consistency.Key Changes
StoryBadgeNFT
and refactored existing code to use these new storage struct.UPGRADEABLE_BEACON
toBaseOrgStoryNFT
along with agetBeacon
function inIOrgStoryNFT
andBaseOrgStoryNFT
.deployOrgStoryNft
anddeployOrgStoryNftByAdmin
to deployStoryBadgeNFT
as aBeaconProxy
of theUpgradeableBeacon
, replacing the previous template cloning.UpgradeableBeacon
deployment logic inDeployHelper
and updated the upgrade script forStoryBadgeNFT
.StoryNFTFactory
toOrgStoryNFTFactory
, along with corresponding variable and function name updates.Test Plan
Refactored existing tests to align with these changes, and all tests pass locally. The deployment and upgrade functionalities of the beacon proxy were successfully tested on-chain. See the testnet transactions for verification:
storyBadgeNFT
beacon proxy: https://odyssey-testnet-explorer.storyscan.xyz/tx/0x53d17cbac79a221f88f7d634ec5fdfc358b24c6888a3b612b24fc9ad7c31729bstoryBadgeNFT
: https://odyssey-testnet-explorer.storyscan.xyz/tx/0xe2c539d78c9cb58c4597836597d9171461fded29d3e2a2a33add3180f9575a25