Skip to content

Commit

Permalink
Update doc/src/build/move/sui-move-library.md
Browse files Browse the repository at this point in the history
Co-authored-by: Sam Blackshear <sam.blackshear@gmail.com>
  • Loading branch information
Clay-Mysten and sblackshear committed Aug 19, 2022
1 parent b5b8f9d commit 8343dd8
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion doc/src/build/move/sui-move-library.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ transfer::share_object(obj);
```
After this call, `obj` stays mutable, but becomes shared by everyone, i.e. anyone can send a transaction to mutate this object. However, such an object cannot be transferred or embedded in another object as a field. For more detail, see the [shared objects](../../learn/build/objects.md#shared) documentation.

Shared mutable objects can be powerful in that they make programming a lot simpler in many cases. However, shared objects are also more expensive to use: they require a full sequencer (a.k.a. a [consensus engine](../../learn/architecture/consensus.md) to order the transactions that touch the shared object, which means longer latency/lower throughput and higher gas cost. One can see the difference in the two programming schemes by looking at the two implementations of TicTacToe: [No Shared Object](https://github.com/MystenLabs/sui/blob/main/sui_programmability/examples/games/sources/tic_tac_toe.move) vs. [Shared Object](https://github.com/MystenLabs/sui/blob/main/sui_programmability/examples/games/sources/shared_tic_tac_toe.move).

## Transaction context
`TxContext` module provides a few important APIs that operate based on the current transaction context.
Expand Down

0 comments on commit 8343dd8

Please sign in to comment.