Skip to content

Commit

Permalink
doc: update tutorials with new images and gas parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
neutrinoks authored and Rqnsom committed May 20, 2024
1 parent bfb0f1f commit 961fe49
Show file tree
Hide file tree
Showing 11 changed files with 9 additions and 5 deletions.
Binary file modified doc/assets/polkadot.js_buy_coin_balances_after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/assets/polkadot.js_buy_coin_balances_before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/assets/polkadot.js_execute_script_buy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/assets/polkadot.js_execute_script_init.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/assets/polkadot.js_multisign_alice_initiates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/assets/polkadot.js_multisign_bob_inits_module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/assets/polkadot.js_multisign_bob_publishes_module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified doc/assets/polkadot.js_publish_module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions doc/tutorial-multi-signer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ Again, developer Bob initialises his module by executing the script transaction
|:--:|
| _Bob initialises his module using [polkadot.js][polkadotjs]_ |

The student Alice is the first one and executes the script transaction `rent_apartment.mvt`, which is already prepared for the student group Alice, Dave and Eve and with two months of rental.
The student Alice is the first one and executes the script transaction `rent_apartment.mvt`, which is already prepared for the student group Alice, Dave and Eve and with two months of rental. Alice can set her gas limit to 0 because the script will only be executed after everyone has signed.
| ![polkadot.js_multisign_alice_initiates.png](assets/polkadot.js_multisign_alice_initiates.png) |
|:--:|
| _Alice initiates the multi signer execution request using [polkadot.js][polkadotjs]_ |

Now same script transaction must be executed by Dave and Eve as well.
Now same script transaction must be executed by Dave and Eve as well where Dave sets his gas limit also to 0. Eve has estimated the needed gas for the script execution to 1377 and now enters that value because he is the final signer and the script will be executed now.
| ![polkadot.js_multisign_eve_finalises.png](assets/polkadot.js_multisign_eve_finalises.png) |
|:--:|
| _Eve finalises the multi signer execution request using [polkadot.js][polkadotjs]_ |

After all three students have executed that script transaction you should see, that the amounts of tokens have be withdrawn from their accounts.

Because every student has to sign the extrinsic call and execute the script execution, the execution request will be stored in the pallet's storage until every student has signed.
Expand Down
6 changes: 3 additions & 3 deletions doc/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ smove node rpc estimate-gas-publish-module --account-id 5FHneW46xGXgs5mUiveU4sbT

The successful result will look like:
```sh
Estimated gas: Estimate (gas_used: 74, vm_status_code: EXECUTED)
Estimated gas: Estimate (gas_used: 732, vm_status_code: EXECUTED)
```

### Publication
Expand Down Expand Up @@ -159,7 +159,7 @@ smove node rpc estimate-gas-execute-script -s build/car-wash-example/script_tran
```
with response:
```sh
Estimated gas: Estimate (gas_used: 21, vm_status_code: EXECUTED)
Estimated gas: Estimate (gas_used: 343, vm_status_code: EXECUTED)
```
### Execution
Expand All @@ -179,7 +179,7 @@ Parameters are:
You have successfully published a Move module on your Polkadot blockchain and executed a Move script successfully.
| ![js_buy_coin_balances_after.png](assets/polkadot.js_buy_coin_balances_before.png) |
| ![js_buy_coin_balances_before.png](assets/polkadot.js_buy_coin_balances_before.png) |
|:--:|
| _Observe the balance before we execute some new scripts which will charge the user_ |
Expand Down

0 comments on commit 961fe49

Please sign in to comment.