[SEP] Contract Home Domain Interface: a home_domain() getter for Soroban contracts #1966
farbodghasemlu
started this conversation in
Stellar Ecosystem Proposals
Replies: 1 comment 6 replies
-
|
Good idea 👍 For SEP-50, we do have We could have a common function to point to a SEP-1 file. Though the SEP-1 spec is too me a bit outdated. We could have more on NFT and contract based assets. I also found myself wanting to use this file for something else. (Also leaving a note here with my vandeta about https to say that we should generalize and even promote other protocols such as IPFS or even Iroh now that there is a v1.) |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What I'm proposing
A minimal, optional SEP defining a single read-only getter,
home_domain() -> String, that lets any Soroban contract declare the domain hosting its SEP-1stellar.toml. The goal is to restore, for contract-based assets, the on-chain to off-chain metadata link that classic Stellar assets already get from the issuing account'shome_domainfield.Prior context
This has come up twice as something that deserves its own standalone SEP, and I'd like to write it:
fn home_domain() -> Stringwas suggested, with the note that SEP-41 and SEP-50 could reference it so certainstellar.tomlfields become relevant when it is implemented.The gap
SEP-41 intentionally exposes only
name,symbol, anddecimalson-chain and is disconnected fromstellar.toml. As a result, a Soroban-native token or NFT has no standard way to point back to a domain for the richer, updatable, human-facing metadata (description, image, organization and legal info) that classic assets resolve through SEP-1 today. Every project reinvents discovery, and wallets, explorers, and indexers cannot resolve contract-asset metadata uniformly.Sketch of the interface
Consumer resolution flow for a contract address
C:C.home_domain(). If empty, no off-chain metadata is declared; stop.https://{home_domain}/.well-known/stellar.tomlover HTTPS.[[CURRENCY]]entry that identifies this contract by its contract address.C.The function is a getter: no authorization, no state requirement. How a contract stores the value (constant, instance storage, or admin-settable) is left to the implementer.
Open questions I'd like feedback on before drafting
[[CURRENCY]]entry already be matched to a contract address, or is a small SEP-1 companion change needed to make step 3 unambiguous?stellar.tomlalso listing the contract address, for anti-spoofing) be in scope here, or kept as a separate SEP?Reference implementation
If there's appetite, I'll provide a soroban-sdk reference implementation of
home_domain()plus a consumer-side resolver that returns the SEP-1 metadata for a given contract address.@leighmcculloch you sketched this
home_domain()shape in #1674. Does a standalone SEP match what you had in mind, and is the instance-level getter the design you'd prefer over a contract-meta key?Beta Was this translation helpful? Give feedback.
All reactions