Skip to content

Commit

Permalink
iota-move-raffle-tutorial: small improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
teunvw14 committed Dec 25, 2024
1 parent c82aecb commit b6ca7ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ compile_sass = true
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = false


[markdown]
# Whether to do syntax highlighting
# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
highlight_code = true
highlight_theme = "1337"

# open links in new tab
external_links_target_blank = true

[extra]
katex_enable = true

Expand All @@ -32,6 +36,7 @@ favicon = "/icon/favicon.png"
# show in the footer
copyright = "Teun van Wezel"


# optional: config your i18n entry
[extra.translations]
languages = [{name = "en", url = "/"}]
Expand Down
2 changes: 1 addition & 1 deletion content/posts/iota-move-raffle-tutorial/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ The output of this command should show you that a `RaffleTicket` was created. Ex

![The RaffleTicket ObjectID in the command output](raffle-ticket-id.png)

Then, to determine who's won the raffle (it's probably you!), resolve the raffle by calling the `resolve` function. If you do this fast enough (or if you set a really high raffle duration), you will get an error with code `0 = ERaffleNotResolvableYet`. This is good; it means that the raffle is working as intended! Wait a little longer and try again. (Or create a new raffle that has a shorter duration.) Here again we have to pass in the `Clock` shared object at address `0x6`, but also the `Random` shared object, which is at address `0x8`.
Then, to determine who's won the raffle (it's probably you!), resolve the raffle by calling the `resolve` function. If you do this fast enough (or if you set a really high raffle duration), you will get an error with code `0` (`ERaffleNotResolvableYet`). This is good; it means that the raffle is working as intended! Wait a little longer and try again. (Or create a new raffle that has a shorter duration.) Here again we have to pass in the `Clock` shared object at address `0x6`, but also the `Random` shared object, which is at address `0x8`.
```bash
$ iota client ptb --move-call $PACKAGE_ID::raffle::resolve \
'<0x2::iota::IOTA>' @$RAFFLE_ID @0x6 @0x8
Expand Down

0 comments on commit b6ca7ec

Please sign in to comment.