-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Multiaddr support for ENS #1577
Conversation
Are there tools to translate a readable multiaddress from/to an hex string? Even if it is beyound the scope of the EIP to implement such tools, having pointers to such tools would help adoption. |
Should a proposal also be made with the maintainers of multiaddr to add swarm hashes? I don't believe there is protoCode for swarm hashes. |
@bgits Yes, we are planning on doing that. However if you want to feel free to do it before us. |
I started a barebones issue at multiformats/multiaddr#73 . Additional details are likely needed. |
Maybe this should be a separate EIP, but the first thing that popped into my mind when i saw this was a "/wallet/network/chainId/0xAddress" It's bound to happen, so if anyone does this please use slip-0044 for the networkId and chainId. |
That is not really user-friendly so I made: https://app.hadriencroubois.com/multiaddr/ Edit: also available at https://gateway.ipfs.io/ipfs/QmRwwTz9Chq4Y7F7ReKKcx1GV6s3H7egmNGrku9XrwiDa8 |
It seems that Vyper does not support |
Everything has it's limitations, Vyper's bytes just have a max length, which make it usable for most cases, but gives you the benefit of always knowing your bounds. And would still be very usable if a high value like 512 bytes was chosen (I mean this is implementation specific but it's all just bytes type on the ABI, the max length is asserted in the contract). I am trying to understand why an array is required here? If you use a map with |
I looked at the linked implementation In vyper, to a consuming node
as solidity's
Would look and act exactly the same way, except - we have a maximum length on the amounts of bytes we store ;) So I think Vyper is still capable of implementing this (unless I am looking a the wrong code 😄 ). |
Hey just found out at https://eips.ethereum.org/EIPS/eip-1577 that you use string like as described here ipfs/kubo#1678 (comment) |
|
Thanks @lidel ! |
eip: 1577
title: Multiaddr support for ENS
author: Dean Eigenmann dean@ens.domains, Nick Johnson nick@ens.domains
type: Standards Track
category: ERC
status: Draft
created: 2018-11-13
discussion-to: #1577
Abstract
This EIP introduces the new
multiaddr
field for ENS resolvers, allowing for a better defined system of mapping names to network and content addresses. Additionally thecontent
andmultihash
fields are deprecated.Motivation
Multiple applications including Metamask and mobile wallets such as Status have begun resolving ENS names to content hosted on distributed systems such as IPFS and Swarm. Due to the various ways content can be stored and addressed, a standard is required so these applications know how to resolve names and that domain owners know how their content will be resolved.
The
multiaddr
field allows for easy specification of network and content addresses in ENS.Specification
The field
multiaddr
is introduced, which permits a wide range of protocols to be supported by ENS names. Resolvers supporting this field MUST returntrue
when thesupportsInterface
function is called with argument0x4cb7724c
.The fields
content
andmultihash
are deprecated.Addresses MUST be represented as a machine-readable multiaddr. The format is specified as follows:
When resolving a multiaddr, applications MUST use the protocol code to determine what type of address is encoded, and resolve the address appropriately for that protocol, if supported.
Example
Text format:
Binary format:
Fallback
In order to support names that have an IPFS or Swarm hash in their
content
field, a grace period MUST be implemented offering those name holders time to update their names. If a resolver does not support themultiaddr
interface, it MUST be checked whether they support thecontent
interface. If they do, the value of that field SHOULD be treated in a context dependent fashion and resolved. This condition MUST be enforced until December 31st, 2018.Implementation
To support
multiaddr
, a new resolver has been developed and can be found here.Copyright
Copyright and related rights waived via CC0.