New ensjs - #230
Draft
LeonmanRolls wants to merge 516 commits into
Draft
Conversation
svemat01
marked this pull request as draft
May 27, 2025 18:02
commit: |
(feat): Added has roles method
V2 expiry + reg data support
feat(ensjs): L1 + L2
V2 expiry reg data
Fix encodeRoleBitmap
feat(ensjs/v2): `getNameRolesForAccount`
- l1.ts (sepolia): ensUniversalResolver 0xeEeE… (stale UpgradableUniversalResolverProxy pointing at a dead RootRegistry) -> 0x2f8a… (canonical UniversalResolverV2 that resolves both v1 and v2 names and exposes findParentRegistry). - addTestContracts (devnet): ensUniversalResolver -> legacy UniversalResolver (0x4b6a…), which resolves both v1 and v2 names; the devnet UpgradableUniversalResolverProxy cannot resolve unmigrated v1 names. - getAvailable: temporarily hardcode the URv2 address used for findParentRegistry per chain, since no single devnet UR both resolves v1 names and exposes findParentRegistry. Documented for removal once the devnet ships a unified URv2 (matching sepolia).
feat(ensjs/getAvailable): support .eth subnames of any depth
Point sepolia ensUniversalResolver at the UpgradableUniversalResolverProxy (0xeEeE…EeEe), which resolves both v1 and v2 names and exposes findParentRegistry. Remove the temporary hardcoded UR-by-chain-id map in v2/getAvailable now that the configured ensUniversalResolver handles findParentRegistry for both v1 and v2 names.
vitest config: - Split tests into two projects: pure-logic (utils, coders, mocked actions) run in parallel; devnet-touching tests run serially in a single fork (evm_snapshot/revert share global IDs on the shared devnet and cannot run across multiple forks). test123.eth fixes: - Wallet set-record/resolver/primaryName and wrapName tests operated on test123.eth, which is intentionally v1-only (not pre-migrated to v2), so the UR findResolver returned address(0) and writes/reads failed. Point them at pre-migrated names (with-subnames.eth / with-contenthash.eth) that resolve via the ENSv1 mirror; keep test123.eth v1-only for the getRegisterPrice availability tests. deps: - Bump vitest + @vitest/coverage-v8 to ^3.2.6; update vi.fn<...>() generics to the v3 single-type-arg signature in ccip tests. - react: bump wagmi + @wagmi/core to ^3, drop tslib. - Remove ts-node from root and react (replaced by node/tsx).
…able fix(ensjs): use UR proxy address for getAvailable subname traversal
(chore): Adding default reverse registrar abi snippets
Refactor v2 getOwner to call UniversalResolver.findOwner instead of reading getState on a specific registry directly. This supports .eth names of any depth via the universal resolver, matching the existing getNameRegistries pattern. The action now takes only a name; the UniversalResolver address is resolved from the chain's ensUniversalResolver contract.
refactor(ensjs): use UR.findOwner for v2 getOwner
Chakravarthy7102
force-pushed
the
feature/fet-1885-ensjs-refactor
branch
from
July 7, 2026 14:08
db0294b to
1b5a991
Compare
…snippets feat(ensjs-abi): add BaseRegistrar admin + wrapETH2LD snippets
- Introduced `isRenewable` function to check if a legacy .eth name can be renewed via the ETHRenewerV1 contract. - Implemented `renewNameV1` function to facilitate the renewal of unmigrated legacy .eth names using ERC-20 payments. - Updated L1 client to include the ETHRenewerV1 contract and its ABI snippets. - Exported new actions in public and wallet modules for broader access.
- Added `viem` version override to package.json and pnpm-lock.yaml to ensure compatibility. - Introduced tests for `isRenewable` and `renewNameV1WriteParameters` functions to validate name renewal logic. - Updated test contracts to include necessary deployment addresses for testing. - Ensured that the new tests cover both renewable and non-existent labels for comprehensive validation.
- Clarified the description of the renewerAddress parameter in getRenewPrice to specify that it refers to unmigrated v1 names. - Updated the isRenewable test case to accurately reflect that it returns false for labels that were never registered.
…e code readability and maintain focus on relevant functionality.
- Introduced `renewName` function to handle the renewal of 2LD .eth names using the ETHRenewerV1 contract. - Implemented `renewNameWriteParameters` to generate the necessary parameters for the renewal transaction. - Added tests for `renewName` to validate behavior for both valid and invalid name inputs. - Removed outdated `renewNames` functionality and tests to streamline the codebase.
- Replaced references to the outdated ETHRenewerV1 with the new ETHRenewer in the wallet renewal functionality. - Updated package.json to include the new ETHRenewer ABI and removed the deprecated ETHRenewerV1 entry. - Adjusted exports in the v1 and v2 index files to reflect the changes in the renewal logic.
- Updated `renewNameWriteParameters` to accept a `contract` parameter, allowing for the use of both `ensEthRegistrar` and `ensEthRenewerV1` for name renewals. - Enhanced tests to validate the encoding of renewal calldata for both contract types. - Removed outdated v2 renewal tests and functionality to streamline the codebase.
- Added comments in `renewNameWriteParameters` to explain that while the two renewers share an identical ABI, they are distinct contracts that may diverge in the future. This helps maintain clarity in the code regarding contract-specific logic.
- Removed the ETHRenewerV1 ABI and related code from the renewal process, consolidating the logic to use a single ABI for both renewer contracts. - Updated `renewNameWriteParameters` to reflect this change, simplifying the return structure. - Adjusted exports in the v1 index file to remove references to the deprecated ETHRenewerV1, enhancing code clarity and maintainability.
Add ETHRenewerV1 support for legacy name renewals
feat: update Sepolia subgraph URL to v1-graphql.ens.dev
| cache: "pnpm" | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install |
Sync the sepolia v2 entries with the contracts-v2 deployment doc
(contracts/docs/addresses/sepolia.md @ 97a5729).
Addresses verified on-chain via cast:
- RootRegistry.getSubregistry("eth") resolves to the new ETHRegistry
- ETHRegistrar.rentPriceOracle() resolves to the new StandardRentPriceOracle
- ETHRegistry.getResolver("test") resolves to the deployment's ENSV1Resolver
- USDC/DAI mocks report the expected symbols and decimals
ensUniversalResolver is unchanged: its EIP-1967 slot now routes through
ManagedUniversalResolverProxy to UniversalResolverV2. Mainnet and all v1
entries are untouched.
|
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.