💥 introduced register-unregister wallet in identity#138
Open
mohamadhammoud wants to merge 19 commits intodevelopfrom
Open
💥 introduced register-unregister wallet in identity#138mohamadhammoud wants to merge 19 commits intodevelopfrom
mohamadhammoud wants to merge 19 commits intodevelopfrom
Conversation
pgonday
requested changes
Jan 5, 2026
pgonday
requested changes
Jan 21, 2026
pgonday
requested changes
Feb 23, 2026
Collaborator
pgonday
left a comment
There was a problem hiding this comment.
Maybe for better consistency with existing functions (linkWallet/unlinkWallet), rename
- registerWalletToIdentity -> linkWalletWithSignature
- unregisterWalletFromIdentity -> unlinkWalletWithSignatureg
Also the signature is not protected against replay, for example the same signature can be used again after unlinking, but maybe we can avoid this with a short validity.
pgonday
requested changes
Feb 25, 2026
contracts/factory/IdFactory.sol
Outdated
| // token linked to an ONCHAINID | ||
| mapping(address => address) private _tokenAddress; | ||
|
|
||
| // nonce per wallet for signature replay protection |
Collaborator
There was a problem hiding this comment.
Inherits OpenZeppelin Nonces instead of custom implementation
contracts/factory/IdFactory.sol
Outdated
| /** | ||
| * @dev See {IIdFactory-walletNonce}. | ||
| */ | ||
| function walletNonce( |
Collaborator
There was a problem hiding this comment.
remove (OZ Nonces inherits)
pgonday
requested changes
Mar 3, 2026
Collaborator
pgonday
left a comment
There was a problem hiding this comment.
EIP-712 is not sufficient to avoid replay attack.
Currently it is possible to call the same signature:
- link (Creates an EIP-712 signature with a 1-hour expiry)
- unlink
- Replay: Replays the exact same still-valid signature to re-link the wallet -> should revert, which is not the case
Add and use OpenZeppelin Nonces
…id-factory # Conflicts: # .github/scripts/coverage.sh # .github/workflows/foundry.yml # .husky/commit-msg # .husky/post-checkout # .husky/post-merge # .husky/pre-commit # contracts/ClaimIssuer.sol # contracts/Identity.sol # contracts/IdentityUtilities.sol # contracts/KeyManager.sol # contracts/factory/IIdFactory.sol # contracts/factory/IdFactory.sol # contracts/gateway/Gateway.sol # contracts/interface/IClaimIssuer.sol # contracts/interface/IERC734.sol # contracts/interface/IERC735.sol # contracts/interface/IIdentity.sol # contracts/interface/IIdentityUtilities.sol # contracts/proxy/ClaimIssuerProxy.sol # contracts/proxy/IdentityUtilitiesProxy.sol # contracts/proxy/ImplementationAuthority.sol # foundry.toml # remappings.txt # soldeer.lock # test/Proxy.t.sol # test/claim-issuers/ClaimIssuer.t.sol # test/claim-issuers/ClaimTo.t.sol # test/factory/ClaimIssuerFactory.t.sol # test/factory/IdFactory.t.sol # test/factory/TokenOid.t.sol # test/gateway/Gateway.t.sol # test/helpers/ClaimIssuerHelper.sol # test/helpers/ClaimSignerHelper.sol # test/helpers/IdentityHelper.sol # test/helpers/OnchainIDSetup.sol # test/identities/Claims.t.sol # test/identities/Executions.t.sol # test/identities/Init.t.sol # test/identities/Keys.t.sol # test/identities/ProxyPattern.t.sol # test/identities/VersionUpgrade.t.sol # test/identity-utilities/IdentityUtilities.t.sol # test/mocks/RevertingIdentity.sol # test/mocks/TestIdentityUtilities.sol # test/utils/Constants.sol
Changes to gas cost
🧾 Summary (10% most significant diffs)
Full diff report 👇
|
pgonday
requested changes
Mar 6, 2026
dd75ad8 to
b88aff1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.