Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Fix auth revocable docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sisuresh committed Mar 25, 2024
1 parent f4b32e2 commit e8d8e1a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions docs/tokens/stellar-asset-contract.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ Stellar classic, which you can learn more about [here](https://developers.stella
`AUTHORIZED_FLAG` set.
- A trustline balance can only be clawed back using the `clawback` contract
function if the trustline has `TRUSTLINE_CLAWBACK_ENABLED_FLAG` set.
- The admin can only deauthorize a trustline if the issuer of the asset has
`AUTH_REVOCABLE_FLAG` set. The deauthorization will fail if the issuer is
missing. Note that when a trustline is deauthorized from Soroban,
`AUTHORIZED_FLAG` is cleared and
`AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG` is set to avoid having to pull
offers and redeeming pool shares.
- Transfers to the issuer account will burn the token, while transfers from
the issuer account will mint.
- Trustline balances are stored in a 64-bit signed integer even though the
Expand All @@ -134,8 +128,6 @@ Stellar classic, which you can learn more about [here](https://developers.stella
- Using `Address::Contract`
- The balance and authorization state will be stored in contract storage, as
opposed to a trustline.
- `AUTH_REVOCABLE_FLAG` is not required to be set on the issuer to deauthorize a
balance.
- Balances are stored in a 128-bit signed integer.
- A balance can only be clawed back if the issuer account had the
`AUTH_CLAWBACK_ENABLED_FLAG` set when the balance was created. A balance is
Expand All @@ -152,6 +144,16 @@ trustlines interact with the `AUTH_REQUIRED_FLAG` issuer flag, allowing asset is
to have the same control in Soroban as they do in Stellar classic. Read more
about `AUTH_REQUIRED_FLAG` [here](https://developers.stellar.org/docs/issuing-assets/control-asset-access#authorization-required-0x1).

### Revoking Authorization

The admin can only revoke authorization from an `Address`, if the issuer of the
asset has `AUTH_REVOCABLE_FLAG` set. The deauthorization will fail if the issuer
is missing. This requirement is true for both the trustline balances of
`Address::Account` and contract balances of `Address:Contract`. Note that when a
trustline is deauthorized from Soroban, `AUTHORIZED_FLAG` is cleared and
`AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG` is set to avoid having to pull offers
and redeeming pool shares.

## Authorization semantics

See the [authorization overview](../soroban-internals/authorization.mdx) and
Expand Down

0 comments on commit e8d8e1a

Please sign in to comment.