Open the-frey opened 2 years ago
recent commentary on https://github.com/cosmos/ibc/pull/615 needs reading and parsing when less tired && moar coffee
Gut feel is the ICS is so geared towards IBC it misses our use case which is the same token ID, on the same chain, from different instances of the same contract.
Welcome any thoughts on this @elsehow - don't want to show any prefix to users but seems like it might be worth writing it to storage and stripping it on read. Maybe exposing via a QueryRaw
or similar where you can get non human friendly info. Or return it as a separate meta field.
However, separate fields or relying on the contract meta is less portable than having it all in the ID, as that makes it:
I think this probably is an implementation detail though that shouldn't generally be exposed to users, hence the QueryRaw
question above
So, thinking about it contract-code
doesn't make sense, as you can instantiate multiple contracts off it. Only contract-addr is guaranteed to be unique (for the purposes of constructing a prefix that is addressable)
other thought: the token_id
doesn't need to be unique
because sending to another variant of this contract, you can't have duplicates, so actually a single dumb string, so long as it is validated #39 is acceptable.
HOWEVER you do still need the meta/global id for provenance. So clearly at mint time the NFT should have an extra field with this. the question is, should it be a straight uuid, or is a compound identifier that contains its own meta acceptable?
I think my preference is probably for chain-id::contract-addr::token-id
as it preserves a lot of important info (even if long)
Okay, so current working plan:
chain-id::contract-addr::token-id
- the contract-addr
part isn't useful until the NFT is transferred. AND when it is transferred, you can just mint the same again on the original contract. HMMActually, if this was on its own chain, you could reduce the problem back to an id that was unique at contract level.
So the addressability issue is actually pushed to HTTP in web2 - because who cares if somebody mints the same name, if they can't route to it?
Which means that at contract level, you're back to network effects I guess. And/or "web of trust" to actually make the service useful.
It feels like there is a missing primitive here. Or maybe that this is the primitive, but it is still too rudimentary.
as a wise cat once said to me "this is probably solved by interchain accounts"
Thinking longer term and for some of the stuff under #29 we need a URI like way of globally referencing a token ID.
Something like:
e.g.
Should it be code? Contract address? i.e.
chain-id::contract-addr::token-id
What else is available as meta at runtime?