Skip to content

Commit

Permalink
🦞 Clawbacks: format more names
Browse files Browse the repository at this point in the history
  • Loading branch information
JFWooten4 committed Aug 5, 2024
1 parent 03ac66d commit 86f3ca8
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions docs/learn/encyclopedia/transactions-specialized/clawbacks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -285,12 +285,12 @@ preamble().then(examplePaymentClawback);
After running our example, we should see the balances reflect the example flow:

```
A - GCIHA: 0
B - GDS5N: 500
C - GC2BK: 250
A - GCIHA...72MJN: 0
B - GDS5N...C7KKX: 500
C - GC2BK...CQVGF: 250
```

Notice that `GCIHA` (the issuer) holds none of the asset despite clawing back 250 from $\mathcal{C}$. This should drive home the fact that clawed-back assets are burned, not transferred.
Notice that $\mathcal{A}$ (the issuer) holds none of the asset despite clawing back 250 from $\mathcal{C}$. This should drive home the fact that clawed-back assets are burned, not transferred.

(It may be strange that A never holds any `AstroToken`, but that’s exactly how issuing works: you create value where there used to be none. Sending an asset to its issuing account is equivalent to burning it, and auditing the total amount of an asset in existence is one of the benefits of properly distributing an asset via a distribution account, which we avoid doing here for example brevity.)

Expand Down Expand Up @@ -362,9 +362,9 @@ function exampleClaimableBalanceClawback() {
After running `preamble().then(examplePaymentClawback)`, we should see the balances reflect our flow:

```
GCIHA: 0
GDS5N: 500
GC2BK: 0
A - GCIHA...72MJN: 0
B - GDS5N...C7KKX: 500
C - GC2BK...CQVGF: 0
```

### Example 3: Selectively Enabling Clawback
Expand Down Expand Up @@ -461,11 +461,14 @@ function exampleSelectiveClawback() {
Run the example (e.g. `via preambleRedux().then(exampleSelectiveClawback)`) and observe its result:

```
GCIHA: 0
GDS5N: 1000
GCIHA: 0
GDS5N: 500
A - GCIHA...72MJN: 0
B - GDS5N...C7KKX: 1000
A - GCIHA...72MJN: 0
B - GDS5N...C7KKX: 500
Clawback failed, as expected!
GCIHA: 0
GDS5N: 500
A - GCIHA...72MJN: 0
B - GDS5N...C7KKX: 500
```

0 comments on commit 86f3ca8

Please sign in to comment.