From 24bd170f69830c5d764a0ceca7767004d648ffd9 Mon Sep 17 00:00:00 2001 From: Bri <92327786+briwylde08@users.noreply.github.com> Date: Tue, 13 Feb 2024 14:36:24 -0700 Subject: [PATCH 1/3] remove "wrap" verbiage for using Stellar assets in smart contracts --- .../stellar-data-structures/assets.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx b/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx index 0247d495b..08dc3d14e 100644 --- a/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx +++ b/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx @@ -9,7 +9,7 @@ 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. +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 implement the [Stellar Asset Contract](#using-stellar-assets-in-smart-contracts) to interact with Stellar assets in smart contracts. ## Asset components @@ -27,9 +27,9 @@ 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 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 (SAC) for a Stellar asset that allows any Soroban smart contract to interact with that asset. Deploying the SAC 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). From 5b7d8687cef3bf729a8261dd99370396e34dbf7f Mon Sep 17 00:00:00 2001 From: Bri Wylde <92327786+briwylde08@users.noreply.github.com> Date: Wed, 14 Feb 2024 09:57:34 -0700 Subject: [PATCH 2/3] Update docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx Co-authored-by: Leigh McCulloch <351529+leighmcculloch@users.noreply.github.com> --- .../stellar-data-structures/assets.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx b/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx index 08dc3d14e..6e31d353d 100644 --- a/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx +++ b/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx @@ -29,7 +29,9 @@ The public key of the issuing account is linked on the ledger to the asset. Resp ## Using Stellar assets in smart contracts -The Soroban CLI can deploy a Stellar Asset Contract (SAC) for a Stellar asset that allows any Soroban smart contract to interact with that asset. Deploying the SAC for a Stellar asset enables that asset for use with 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. + +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). From edcd564260e8d834a180c319094ebe472aea7040 Mon Sep 17 00:00:00 2001 From: Bri <92327786+briwylde08@users.noreply.github.com> Date: Wed, 14 Feb 2024 10:01:05 -0700 Subject: [PATCH 3/3] implement suggestions --- .../stellar-data-structures/assets.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx b/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx index 08dc3d14e..090a42445 100644 --- a/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx +++ b/docs/fundamentals-and-concepts/stellar-data-structures/assets.mdx @@ -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 implement the [Stellar Asset Contract](#using-stellar-assets-in-smart-contracts) to interact with Stellar assets in smart contracts. - ## Asset components ### Asset code @@ -92,3 +90,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.