diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index f7104af2..6d0817df 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -102,7 +102,7 @@ - [Dynamic Fields](./programmability/dynamic-fields.md) - [Dynamic Object Fields](./programmability/dynamic-object-fields.md) - [Dynamic Collections](./programmability/dynamic-collections.md) - - [Pattern: Witness]() + - [Pattern: Witness](./programmability/witness-pattern.md) - [One Time Witness](./programmability/one-time-witness.md) - [Publisher Authority](./programmability/publisher.md) - [Display](./programmability/display.md) diff --git a/book/src/programmability/README.md b/book/src/programmability/README.md index e3b857cc..90f943b1 100644 --- a/book/src/programmability/README.md +++ b/book/src/programmability/README.md @@ -1,7 +1,7 @@ # Advanced Programmability -In previous chapters we've covered [the basics of Move](./../move-basics/README.md) and -[Sui Storage Model](./../programmability/README.md). Now it's time to dive deeper into the advanced +In previous chapters we've covered [the basics of Move](./../move-basics) and +[Sui Storage Model](./../storage). Now it's time to dive deeper into the advanced topics of Sui programmability. This chapter introduces more complex concepts, practices and features of Move and Sui that are diff --git a/book/src/programmability/one-time-witness.md b/book/src/programmability/one-time-witness.md index 699698c1..f277a451 100644 --- a/book/src/programmability/one-time-witness.md +++ b/book/src/programmability/one-time-witness.md @@ -39,14 +39,7 @@ To check if a type is an OTW, `sui::types` module of the to check if the type is an OTW. ```move -use sui::types; - -const ENotOneTimeWitness: u64 = 1; - -/// Takes an OTW as an argument, aborts if the type is not OTW. -public fun takes_witness(otw: T) { - assert!(types::is_one_time_witness(&otw), ENotOneTimeWitness); -} +{{#include ../../../packages/samples/sources/programmability/one-time-witness.move:usage}} ```