#Uncertainty about relation between Soroban contracts and trustlines, and metadata for Soroban tokens

1 messages · Page 1 of 1 (latest)

bleak belfry
#

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:

  1. 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 with C - hence, it's a Soroban Smart Contract, which implements Token Interface.
    I see that some assets have both Issued by and Soroban Contract addresses 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)
  2. 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.toml which 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?
bleak belfry
#

@molten river , can you help with that?

flat locust
#

a quick summary on the terminology:
Stellar Classic Asset - just a pair of issuer account (G-account) and a name.
trustline - an entry that belongs to a G-account that contains the balance of a given Asset (and acknowledges that account wants to hold the said balance)
Stellar Asset Contract - a special built-in smart contract that allows other contracts to interact with the classic assets. Importantly, it doesn't replace trustlines - when dealing with G-accounts, it just modifies the respective trustlines (and requires these to exist at the moment of transaction execution). for C-account balances it uses the regular smart contract storage (i.e. contracts don't have trustlines)

#

I hope that helps clear out most of your questions. as for contract token standards for the logos, I don't recall if there is a well established standard yet, but there definitely have been discussions around dev discord.