Add ETHRenewerV1 support for legacy name renewals#355
Open
Chakravarthy7102 wants to merge 9 commits into
Open
Conversation
- 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.
commit: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/fet-1885-ensjs-refactor #355 +/- ##
===================================================================
+ Coverage 69.96% 70.21% +0.24%
===================================================================
Files 166 166
Lines 7738 7721 -17
Branches 812 814 +2
===================================================================
+ Hits 5414 5421 +7
+ Misses 2290 2266 -24
Partials 34 34 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- 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.
v1rtl
requested changes
Jul 6, 2026
- 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.
v1rtl
requested changes
Jul 8, 2026
- 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.
v1rtl
requested changes
Jul 8, 2026
Comment on lines
+100
to
+120
| const baseParams = { | ||
| address, | ||
| functionName: 'renew', | ||
| args: [label, duration, paymentToken, referrer] as const, | ||
| chain: client.chain, | ||
| account: client.account, | ||
| } as const | ||
|
|
||
| if (contract === 'ensEthRenewerV1') { | ||
| return { | ||
| ...baseParams, | ||
| abi: ethRenewerV1RenewSnippet, | ||
| } as const satisfies WriteContractParameters< | ||
| typeof ethRenewerV1RenewSnippet | ||
| > | ||
| } | ||
|
|
||
| return { | ||
| ...baseParams, | ||
| abi: ethRegistrarRenewSnippet, | ||
| } as const satisfies WriteContractParameters<typeof ethRegistrarRenewSnippet> |
Collaborator
There was a problem hiding this comment.
since ABIs are the same, we don't really need two separate ones for it, no?
can be collapsed to the same return and use ethRegistrarRenewSnippet
- 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.
|
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.



isRenewablefunction to check if a legacy .eth name can be renewed via the ETHRenewerV1 contract.renewNameV1function to facilitate the renewal of unmigrated legacy .eth names using ERC-20 payments.