Skip to content

Commit b6f6656

Browse files
committed
feat!: target the post-audit-2 PermissionedResolver
contracts-v2 post-audit-2 (PR #417) rewrote PermissionedResolver: setters take the DNS-encoded name instead of a node, records are inodes shared between names via linkToNode/linkToRecord (setAlias is gone), roles are root- or argument-scoped (grantRootRoles / grantSetterRoles; per-name grants and the authorize*Roles family are gone), the role bit layout changed, and initialize takes Grant[] plus an optional multicall. UserRegistry.initialize takes Grant[] as well. ensjs-abi: new permissionedResolver snippets (setters, multicall, resolve, links, grantSetterRoles/decodeSetter/roleCount, initialize, events), a real revokeRoles, eacGrantInitializeSnippet; the alias, clearRecords, multicallWithNodeCheck and authorize*Roles snippets are removed. ensjs: linkToNode / linkToRecord replace setAlias / deleteAlias / clearRecords; name-based setRecords under wallet/v2; grantResolverRoles / revokeResolverRoles take root or setter scopes (revoke also a raw resource); deployPermissionedResolver builds the Grant[] + calls initializer; deployVerifiableProxy and deploySubregistry default to the Grant[] initializer; resolver role constants and computeResolverResource follow the new layout; getResolverName reads through resolve. Devnet tests for the resolver actions are rewritten for the new API and need a devnet with the post-audit-2 contracts; the encoders are covered by pure tests.
1 parent 4018fc9 commit b6f6656

34 files changed

Lines changed: 2025 additions & 1022 deletions
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
'@ensdomains/ensjs-abi': major
3+
'@ensdomains/ensjs': major
4+
---
5+
6+
Target the post-audit-2 `PermissionedResolver` (contracts-v2 PR #417).
7+
8+
- `@ensdomains/ensjs-abi/v2/permissionedResolver`: name-based setter snippets (`setAddress(name, ...)`, `setText(name, ...)`, ...), `multicall`, `resolve`, `linkToNode` / `linkToRecord` / `getRecordId` / `getRecordCount`, `grantSetterRoles` / `decodeSetter` / `roleCount`, `initialize(Grant[] grants, bytes[] calls)`, the `Linked` / `*Updated` / `ResourceArgument` events. Removed: `setAlias` / `getAlias`, `clearRecords`, `multicallWithNodeCheck`, the `authorize*Roles` family. `revokeRoles` is a real call again. `eacGrantInitializeSnippet` (`initialize(Grant[])`) replaces the `initialize(address, uint256)` form for `UserRegistry` proxies.
9+
- `@ensdomains/ensjs/wallet/v2`: `setAlias` / `deleteAlias` become `linkToNode` / `linkToRecord` (`linkToRecord` with no record id unlinks, replacing `clearRecords`); new name-based `setRecords`; `grantResolverRoles` / `revokeResolverRoles` scopes are `root` and `setter` (plus `resource` for revokes), the per-name scope is gone; new `deployPermissionedResolver`; `deployVerifiableProxy` and `deploySubregistry` default to the `Grant[]` initializer.
10+
- `@ensdomains/ensjs/utils/v2`: resolver roles follow the new bit layout (`ROLE_SET_ADDRESS`, `ROLE_SET_DATA`, `ROLE_LINK`, `ROLE_CAN_NAME`; no `PUBKEY` / `ALIAS` / `CLEAR`) and include admin variants; `computeResolverResource` takes a setter scope (`{ kind: 'text', key }`, `{ kind: 'address', coinType }`, ...) instead of `(node, part)`; `encodeResolverSetterScope`, `decodeResolverRoleBitmap`, and the name-based record parameter builders are new.
11+
- `getResolverName` reads through `resolve` since the resolver has no `name(node)` getter.

0 commit comments

Comments
 (0)