There are a few discussions in this Discord server about Classic Stellar Assets, which require establishing trustlines and about SACs, which are Soroban contracts that are created in order to communicate with Classic Stellar Assets and Soroban contracts which implement Token Interface.
Trustline exists only for Classic Stellar Assets and for establishing it you have to invoke change_trust operation with Asset Code and Issuer Account ID provided. I think that this topic is a bit unclear still:
- Why does the block explorer for the asset's smart contract contain information about trustlines like here:
https://stellar.expert/explorer/public/asset/CDNR7F3CE2GGHNCSGEJOP4VQ5QFQNEUOHKU5TIPCBXKV4YK34YRCKFB4 ?
This asset's address starts withC- hence, it's a Soroban Smart Contract, which implements Token Interface.
I see that some assets have bothIssued byandSoroban Contractaddresses like for this asset:
https://stellar.expert/explorer/public/asset/XRP-GBXRPL45NPHCVMFFAYZVUVFFVKSIZ362ZXFP7I2ETNQ3QKZMFLPRDTD5
So, I assume that this asset has a SAC created for it, which is exactly the Soroban Contract you can work with in your own contract.
If so, it's clear why there's a notion of trustline on explorer page about this asset. But what I've read in channel also - is that you don't have to establish trustlines if you work with this SAC, since information about balances for this case can be stored in both trustline and SAC storage. If so, it's a bit complicated, but ok) - In order for classical assets to be discoverable and seen with logo and information about organization in wallets, I assume you have to provide a link to
stellar.tomlwhich contains required metadata about the currencies which your organization issued.
But how to add the same meta-information for tokens, which only contain the Soroban contract that implements the Token Interface?
Explore detailed stats, price history, and analytic reports for all assets on Stellar Network. View comprehensive account history, search transactions and payments, examine well-known accounts, analyze XLM and Stellar Network performance.
Explore detailed stats, price history, and analytic reports for all assets on Stellar Network. View comprehensive account history, search transactions and payments, examine well-known accounts, analyze XLM and Stellar Network performance.