Open willemneal opened 3 months ago
+1 for this. The only thing is that we should use native
instead, as it's what we use on our sdks.
Works for me! Updating!
We can programmatically convert from any SEP-11 asset to the contract ID as well, where native
is just one of the supported values. That way any ASSET:ADDRESS is an automatic alias that works.
I'd prefer programmatically converting from the asset values instead of hardcoding some reserved values because native's contract ID changes depending on the network passphrase/id, and this more holistically addresses the issues of referencing assets.
This is definitely the way, but it would be nice to list the possible assets. Is there an official list of verified assets? Or at least a site that lists them?
There isn't a centralised list of assets and I wouldn't want to add one to the CLI. There is SEP-42 for asset lists from different providers, but I think we're jumping ahead to add support for that. Simply making it possible to reference contracts with their asset code+issuer is useful on its own without scoping this out to including asset lists.
What problem does your feature solve?
Currently to interact with a SAC you first need to use
contract id asset
to find the contract id.What would you like to see?
Have special reserved aliases for example, xlm so that users can immediately use it. E.g.
contract invoke --id native -- transfer ...
What alternatives are there?