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: fix low_level_call anchor #1072

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion docs/src/calling-contracts/low-level-calls.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ On the SDK side, you can construct an encoded function selector using the `fuels
E.g. to call the following function on the target contract:

```rust,ignore
{{#include ../../../packages/fuels/tests/contracts/contract_test/src/main.sw:initialize_counter}}
{{#include ../../../packages/fuels/tests/contracts/contract_test/src/main.sw:low_level_call}}
```

you would construct the function selector and the calldata as such, and provide them to the caller contract (like the one above):
Expand Down
2 changes: 2 additions & 0 deletions packages/fuels/tests/contracts/contract_test/src/main.sw
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ abi TestContract {
fn increment_counter(value: u64) -> u64;
#[storage(read)]
fn get_counter() -> u64;
// ANCHOR: low_level_call
#[storage(write)]
fn set_value_multiple_complex(a: MyStruct, b: str[4]);
// ANCHOR_END: low_level_call
#[storage(read)]
fn get_str_value() -> str[4];
#[storage(read)]
Expand Down
Loading