-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] Introduce Chain Id 0 (EOA Chain Id) #7
Open
lucemans
wants to merge
9
commits into
master
Choose a base branch
from
ensip/chain-id-0
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
1e93ea0
Introduce template
lucemans 9b2dd44
Update
lucemans 2329134
Introduce examples
lucemans 602baa6
Update content
lucemans f1e2148
Update x.md
lucemans 293cd49
Update x.md
lucemans 1aa7462
Expand on language & introduce public resolver modifications
lucemans 6042bf5
Improve resolution order
lucemans c325c9f
Update to remove client-side implementation
lucemans File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
description: A standard for storing EOA/Fallback addresses in ENS. | ||
contributors: | ||
- luc.eth | ||
ensip: | ||
created: '2024-10-01' | ||
status: draft | ||
--- | ||
|
||
# ENSIP-X: EOA/Fallback Chain Id | ||
|
||
## Abstract | ||
|
||
This ENSIP specifies a way to set an EOA/Fallback address for a name. This allows for users to set one address to be used for all chains, or as a fallback for when a chain-specific address record is not set. | ||
|
||
## Motivation | ||
|
||
With the rising interest and research around account abstraction, in addition to the maturation of the multi-chain ecosystem, there is a need for users to be able to set a single address to be used across all chains. | ||
|
||
For a simple Externally Owned Account (EOA) user, this means setting their address once, and never having to worry about it again. | ||
For more advanced users, this means that chain-specific records can be used for smart-contract wallets, and an EOA can be specified as fallback. | ||
|
||
This ENSIP introduces opt-in functionality that can be leveraged by both EOA and smart-contract wallets, and does not impact the existing functionality of ENS. | ||
|
||
## Specification | ||
|
||
This ENSIP aims to extend the functionality introduced in [ENSIP-9](./9) and [ENSIP-11](./11) and simply relies on the same functionality. | ||
|
||
### CoinType for EOA | ||
|
||
The standard CoinType for this proposed chain id is `2147483648`. | ||
|
||
This can be derived from `0x80000000 | 0` or `evmChainIdToCoinType(0)` , as per [ENSIP-11](./11). | ||
|
||
### Resolution Order | ||
|
||
The resolution process remains as normal however now an extra lookup can be implemented client-side (or via proposed public resolver implementation). | ||
|
||
The initial lookup is done for the chainId the user is currently on / interested in. | ||
For example for Optimism (EVM Chain Id 10), the initial lookup would be for `coinType = 0x80000000 | 10`. | ||
|
||
If the lookup does not result in an address, a second lookup is done for the EOA Chain Id. | ||
|
||
### Proposed Implementation | ||
|
||
There are multiple routes we considered around implementing this; client-side, or via a public resolver implementation. | ||
|
||
For the smoothest implementation, leveraging the public resolver to handle this functionality for us seems ideal. | ||
This would mean no additional code is needed, and we can use the regular one-liners you are used to. | ||
|
||
### Public Resolver | ||
|
||
The public resolver could choose to implement a fallback mechanism for EOA addresses. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can |
||
Such that when a `coinType` lookup occurs (for an EVM-compatible chain), and the resolver does not find an address record, it will return the EOA address. | ||
|
||
This allows for additional flexibility allowing users to set a fallback address for all evm-compatible chains. | ||
|
||
## Backwards Compatibility | ||
|
||
This proposal is backwards compatible with the existing `addr(node, coinType)` functionality, and simply adds additional fallback behavior. | ||
|
||
## Copyright | ||
|
||
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/). |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably it should mention https://docs.ens.domains/ensip/19 as step 9 also incorporates chainid 0 as a fallback mechanism.