Skip to content

Commit

Permalink
Update transactions.md (MystenLabs#9024)
Browse files Browse the repository at this point in the history
restoring mermaid image after resolving build issues

## Description 

Describe the changes or additions included in this PR.

## Test Plan 

How did you test the new or updated feature?

---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.

### Type of Change (Check all that apply)

- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration

### Release notes
  • Loading branch information
randall-Mysten authored Mar 8, 2023
1 parent af4f0fd commit d57bbc7
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/src/learn/transactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,25 @@ After receiving 2 SUI coins, Anna sent it immediately to Tom. Now Tom has 6 SUI

Finally, Tom sends all of his SUI coins to John. For this transaction, the input is actually two objects (Object A and Object B). Object B is destroyed, and its value is added to Object A. As a result, the transaction's output is only Object A with a value of 6 SUI.

```mermaid
flowchart LR
id1(Object A\nfa:fa-coins 5 SUI\n fa:fa-person Tom):::object-a
id2(Object C\nfa:fa-coins 1 SUI\n fa:fa-person Alice)
id3(Object A\nfa:fa-coins 4 SUI\n fa:fa-person Tom):::object-a
id4(Object B\nfa:fa-coins 2 SUI\n fa:fa-person John):::object-b
id5(Object B\nfa:fa-coins 2 SUI\n fa:fa-person Anna):::object-b
id6(Object B\nfa:fa-coins 2 SUI\n fa:fa-person Tom):::object-b
id7(Object A\nfa:fa-coins 6 SUI\n fa:fa-person John):::object-a
id1-->|tx-1|id2
id1-->|tx-1|id3
id4-->|tx-2|id5
id5-->|tx-3|id6
id3-->|tx-4|id7
id6-->|tx-4|id7
classDef object-a fill:#f225
classDef object-b fill:#ff43
```

## Further reading

* See the [Move tutorial](move/index.md) to develop Sui smart contracts.
Expand Down

0 comments on commit d57bbc7

Please sign in to comment.