Skip to content

Refactor PermissionedResolver to use inodes#240

Draft
adraffy wants to merge 2 commits intomainfrom
feat/permres-inode
Draft

Refactor PermissionedResolver to use inodes#240
adraffy wants to merge 2 commits intomainfrom
feat/permres-inode

Conversation

@adraffy
Copy link
Member

@adraffy adraffy commented Mar 12, 2026

  • added temporary IDataResolver — for ENSIP-24 support
  • added IRecordSetters — a new style of setter that drops the target
  • added IRecordResolver
    • new v2 events
  • refactored IPermissionedResolver
    • removed versioning and aliasing
    • removed IExtendedResolver
    • added createRecord(), updateRecord{ByName|ById}(), bindRecord(), and getRecordId()
    • replaced grantNamedRoles() with grantRecordRoles()
    • replaced grantNamed{Text|Addr}Roles() with grantSetterRoles()
      • fine-grained permissions apply to IAddressResolver, ITextResolver, IDataResolver, IABIResolver, and IInterfaceResolver

// create/replace an inode
uint256 recordId = resolver.createRecord("raffy.eth", [
    abi.encodeCall(IRecordSetters.setAddr, (60, 0x5105))
]);

// alias an inode
resolver.bindRecord(recordId, "chonk.eth"); // now same as raffy.eth

// update an inode
resolver.updateRecordById(recordId, [...]);
resolver.updateRecordByName("chonk.eth", [...]); // updates raffy.eth

// find an inode
uint256 recordId = resolver.getRecordId(namehash("raffy.eth'));

@makoto makoto added the v2-audit PRs needed for audit label Mar 12, 2026
@makoto makoto added post-launch and removed v2-audit PRs needed for audit labels Mar 12, 2026
@adraffy
Copy link
Member Author

adraffy commented Mar 13, 2026

Todo:

  • try with v1 setters only
  • try with v1 setter compatibility
  • try with hierarchical inodes (Nick's idea)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants