Skip to content

Commit

Permalink
remove "wrap" verbiage for using Stellar assets in smart contracts (#302
Browse files Browse the repository at this point in the history
)

* remove "wrap" verbiage for using Stellar assets in smart contracts

* Update docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx

Co-authored-by: Leigh McCulloch <[email protected]>

* implement suggestions

---------

Co-authored-by: Leigh McCulloch <[email protected]>
  • Loading branch information
briwylde08 and leighmcculloch authored Feb 16, 2024
1 parent 0b5fa61 commit 4af5ff7
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ Accounts on the Stellar network can be used to track, hold, and transfer any typ

Assets on Stellar have two identifying characteristics: the asset code and the issuer. Since more than one organization can issue a credit representing the same asset, asset codes often overlap (for example, multiple companies offer a USD token on Stellar). Assets are uniquely identified by the combination of their asset code and issuer.

You can also create smart contract tokens using the [Token Interface](https://soroban.stellar.org/docs/reference/interfaces/token-interface) but it is possible, and even recommended in most cases, to [wrap a Stellar asset](#wrapping-stellar-assets) using the Stellar Asset Contract for use in smart contracts.

## Asset components

### Asset code
Expand All @@ -27,9 +25,11 @@ There is no dedicated operation to create an asset on Stellar. Instead, assets a

The public key of the issuing account is linked on the ledger to the asset. Responsibility for and control over an asset resides with the issuing account. Since settings are stored at the account level on the ledger, the issuing account is where you use set_options operations to link to meta-information about an asset and set authorization flags.

## Wrapping Stellar assets
## Using Stellar assets in smart contracts

Assets issued on the Stellar network are accessible to smart contracts. Every Stellar asset has reserved a Stellar Asset Contract that can be deployed by anyone who wants to be able to interact with the asset from a contract.

Assets issued on the Stellar network can be used in smart contracts with the Stellar Asset Contract (SAC), which is an implementation of [CAP-46-6: Smart Contract Standardized Asset](https://github.com/stellar/stellar-protocol/blob/master/core/cap-0046-06.md). The SAC allows users to use their Stellar account and trustline balances in Soroban and is a primary intersection where smart contracts interact with the rest of the Stellar network.
The Soroban CLI can deploy a Stellar Asset Contract for a Stellar asset. Deploying the Stellar Asset Contract for a Stellar asset enables that asset for use with smart contracts.

Learn more in the [SAC section in the Soroban docs](https://soroban.stellar.org/docs/advanced-tutorials/stellar-asset-contract).

Expand Down Expand Up @@ -92,3 +92,7 @@ In Horizon and client-side libraries such as js-stellar-sdk, the integer encoded
## Deleting or burning assets

To delete, or "burn", an asset, you must send it back to the account that issued it.

## Custom token contracts

Custom token contracts can be deployed on Stellar by deploying a contract that implements the [Token Interface](https://soroban.stellar.org/docs/reference/interfaces/token-interface), which is the same interface implemented by the [Stellar Asset Contract (SAC)](https://soroban.stellar.org/docs/tokens/stellar-asset-contract) for Stellar assets.

0 comments on commit 4af5ff7

Please sign in to comment.