Skip to content

Conversation

@mohamadhammoud
Copy link
Collaborator

@mohamadhammoud mohamadhammoud commented Jul 31, 2025

This feature includes refactoring:

Identity contract includes key management and claim management systems.
I created Key Manager and moved the key management functionality from Identity to Key Manager, the the Identity inherits the Key Manager as well.

Applied the ERC7201 for Identity and claim issuer
Applied the 1967 proxy pattern to the claim issuer

@mohamadhammoud mohamadhammoud requested a review from pgonday July 31, 2025 14:12
@pgonday pgonday self-requested a review August 1, 2025 04:49
Copy link
Collaborator

@pgonday pgonday left a comment

Choose a reason for hiding this comment

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

With the storage update, when a contract is updated and already have claims or keys, the indexes storage variables will have zero value which will lead to an invalid state...
Add a function like initializeUpgradeV2 with keys and claims array parameters (get offchain from events for example) which will initialize the indexes maps.

@Joachim-Lebrun
Copy link
Contributor

With the storage update, when a contract is updated and already have claims or keys, the indexes storage variables will have zero value which will lead to an invalid state... Add a function like initializeUpgradeV2 with keys and claims array parameters (get offchain from events for example) which will initialize the indexes maps.

agreed with Philippe, we can probably make it a function with no access control, so that we can run a script ourselves on all existing identities no matter if we have management key or not, to make the upgrade clean. Once it is done we can upgrade the contracts again, with a clean version of the contracts that doesn't contain the upgrade-related function

Base automatically changed from feature/BT-1108-github-lint-coverage-workflows to develop August 25, 2025 12:29
* @return The version string
*/
function version() external view returns (string memory) {
return _getClaimStorage().version;
Copy link
Contributor

Choose a reason for hiding this comment

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

please hardcode, otherwise you need to update the storage on each proxy individually when the version is upgraded, it just doesn't scale if you add the value in storage.

@Joachim-Lebrun Joachim-Lebrun merged commit be1f67a into develop Oct 13, 2025
2 checks passed
@Joachim-Lebrun Joachim-Lebrun deleted the feature/BT-1183-refactor-identity-contract branch October 13, 2025 17:19
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.

4 participants