Draft
Conversation
| uint256 oldSessionId = sessionIdByAccount[rpId][msg.sender]; | ||
| if (oldSessionId != 0 && oldSessionId != sessionId) { | ||
| Session storage oldS = sessions[rpId][oldSessionId]; | ||
| if (oldS.account == msg.sender) { |
Contributor
There was a problem hiding this comment.
the way this contract is now this if statement will always return true, but I think it's good to keep it for safety reasons
Dzejkop
reviewed
Feb 6, 2026
| /// @title World ID Address Book V4 | ||
| /// @notice Records that an account has been verified for (rpId, issuerSchemaId) and enforces session reuse rules. | ||
| /// @dev Freshness is evaluated by the caller using `verifiedAt`; this contract does not store expirations. | ||
| contract WorldIDAddressBookV4 is Ownable2Step { |
Contributor
There was a problem hiding this comment.
Should we also make it upgradeable?
Contributor
There was a problem hiding this comment.
agree, eventually we can use similar pattern we already use for the other contracts
karankurbur
reviewed
Feb 17, 2026
| /// @title World ID Address Book V4 | ||
| /// @notice Records that an account has been verified for (rpId, issuerSchemaId) and enforces session reuse rules. | ||
| /// @dev Freshness is evaluated by the caller using `verifiedAt`; this contract does not store expirations. | ||
| contract WorldIDAddressBookV4 is Ownable2Step { |
Contributor
There was a problem hiding this comment.
create an interface that defines errors/functions/events. standard practice for external contracts to interact
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.
WIP
test are AI generated
missing EIP 712 in case we do want to enforce account verification