Skip to content

feat: address book#369

Draft
aurel-fr wants to merge 3 commits intomainfrom
aurel/address-book
Draft

feat: address book#369
aurel-fr wants to merge 3 commits intomainfrom
aurel/address-book

Conversation

@aurel-fr
Copy link

@aurel-fr aurel-fr commented Feb 6, 2026

WIP
test are AI generated
missing EIP 712 in case we do want to enforce account verification

uint256 oldSessionId = sessionIdByAccount[rpId][msg.sender];
if (oldSessionId != 0 && oldSessionId != sessionId) {
Session storage oldS = sessions[rpId][oldSessionId];
if (oldS.account == msg.sender) {
Copy link
Contributor

Choose a reason for hiding this comment

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

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

/// @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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also make it upgradeable?

Copy link
Contributor

Choose a reason for hiding this comment

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

agree, eventually we can use similar pattern we already use for the other contracts

/// @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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

create an interface that defines errors/functions/events. standard practice for external contracts to interact

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