3

I've created accountA with a custom asset code ASTRO and trust by issuing account(AA). Next, I created another accountB with asset ASTRO trust by issuing account(AA). Now, when I tried to create a payment operation. accountA pay 1 ASTRO to accountB I got an error. However, when I use the asset type: native, it works fine. I'm not sure if this flow is correct maybe I'm doing it wrong. Any ideas/suggestion is greatly appreciated. Thanks!

2

To make your case work:

First, use accountB to trust "ASTRO"(issued by accountA), and sign with accountB. This means that now accountA recognizes ASTRO.

Then, you may send this ASTRO(by accountA) freely to accountB.


Explanation:

On Stellar, there is an operation [Change Trust] that allows a user to "trust" an asset (or the other way, revoke the trust). You cannot hold any of an asset, before the asset is trusted by you.

The trust logic is to prevent some random guys on the network sending you something that is unknown to you. Otherwise, your account could be congested with many unwanted trash assets, or even illegal/stolen assets.

Your operation failed simply because accountB has not trusted your "ASTRO"(issued by accountA).


p.s. Lumen (XLM) is a system default asset to pay transaction fee. It is the only "native" asset that does not require trust for a user to hold.

p.s. Assets of SAME ASSET NAME but with DIFFERENT ISSUERS are treated as DIFFERENT ASSETS. For example, "phone" issued by Apple is different from "phone" issued by Samsung.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.