Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: improve multicall command output example #2887

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions docs/src/starknet/multicall.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function = "put"
inputs = ["0x123", 234] # Numbers can be used directly without quotes
```

After running `sncast multicall run --path file.toml`, a declared contract will be first deployed, and then its function `put` will be invoked.
After running `sncast multicall run --path template.toml`, a declared contract will be first deployed, and then its function `put` will be invoked.

> 📝 **Note**
> The example above demonstrates the use of the `id` property in a deploy call, which is then referenced as the `contract address` in an invoke call.
Expand All @@ -46,21 +46,28 @@ Additionally, the `id` can be referenced in the inputs of deploy and invoke call
> 📝 **Note**
> For numbers larger than 2^63 - 1 (that can't fit into `i64`), use string format (e.g., `"9223372036854775808"`) due to TOML parser limitations.

<!-- TODO: Adjust snippet and check remove ignoring output -->
<!-- { "ignored_output": true } -->
```shell
$ sncast multicall run --path multicall_example.toml
$ sncast multicall run --path template.toml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file still doesn't exist

```

<details>
<summary>Output:</summary>

```shell
command: multicall
transaction_hash: [..]

To see invocation details, visit:
transaction: https://sepolia.starkscan.co/tx/[..]
Executing multicall transaction...
[DEPLOY] Contract deployment successful
Contract address: 0x1234...5678
Transaction hash: 0xabcd...ef01

[INVOKE] Function call successful
Contract: map_contract
Function: put
Transaction hash: 0xabcd...ef01

Multicall transaction completed successfully
Total fee: 0.000123 ETH
Transaction details: https://sepolia.starkscan.co/tx/0xabcd...ef01
```
</details>
<br>
Expand Down