Skip to content

Commit

Permalink
Remove unnecessary account in docs for scripts (#1311)
Browse files Browse the repository at this point in the history
<!-- Reference any GitHub issues resolved by this PR -->

Closes #

## Introduced changes

<!-- A brief description of the changes -->


## Checklist

<!-- Make sure all of these are complete -->

- [X] Linked relevant issue
- [X] Updated relevant documentation
- [X] Added relevant tests
- [X] Performed self-review of the code
- [X] Added changes to `CHANGELOG.md`
  • Loading branch information
THenry14 authored Dec 6, 2023
1 parent e465589 commit b9cddaa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 23 deletions.
22 changes: 2 additions & 20 deletions crates/cast/tests/e2e/script/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,7 @@ use snapbox::cmd::{cargo_bin, Command};
#[tokio::test]
async fn test_happy_case() {
let script_name = "call_happy";
let args = vec![
"--accounts-file",
"../../accounts/accounts.json",
"--account",
"user1",
"--url",
URL,
"script",
&script_name,
];
let args = vec!["--url", URL, "script", &script_name];

let snapbox = Command::new(cargo_bin!("sncast"))
.current_dir(SCRIPTS_DIR.to_owned() + "/misc")
Expand All @@ -29,16 +20,7 @@ async fn test_happy_case() {
#[tokio::test]
async fn test_failing() {
let script_name = "call_fail";
let args = vec![
"--accounts-file",
"../../accounts/accounts.json",
"--account",
"user1",
"--url",
URL,
"script",
&script_name,
];
let args = vec!["--url", URL, "script", &script_name];

let snapbox = Command::new(cargo_bin!("sncast"))
.current_dir(SCRIPTS_DIR.to_owned() + "/misc")
Expand Down
5 changes: 2 additions & 3 deletions docs/src/starknet/script.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,14 @@ version = "0.1.0"

[dependencies]
starknet = ">=2.3.0"
sncast_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.11.0" }
sncast_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.12.0" }
```

To run the script, do:

```shell
$ sncast \
--url http://127.0.0.1:5050 \
--account example_user \
script my_script

command: script
Expand Down Expand Up @@ -142,7 +141,7 @@ version = "0.1.0"

[dependencies]
starknet = ">=2.3.0"
sncast_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.11.0" }
sncast_std = { git = "https://github.com/foundry-rs/starknet-foundry.git", tag = "v0.12.0" }
map = { path = "../contracts" }

[lib]
Expand Down

0 comments on commit b9cddaa

Please sign in to comment.