Skip to content

Commit b9cddaa

Browse files
authored
Remove unnecessary account in docs for scripts (#1311)
<!-- 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`
1 parent e465589 commit b9cddaa

File tree

2 files changed

+4
-23
lines changed

2 files changed

+4
-23
lines changed

crates/cast/tests/e2e/script/call.rs

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,7 @@ use snapbox::cmd::{cargo_bin, Command};
55
#[tokio::test]
66
async fn test_happy_case() {
77
let script_name = "call_happy";
8-
let args = vec![
9-
"--accounts-file",
10-
"../../accounts/accounts.json",
11-
"--account",
12-
"user1",
13-
"--url",
14-
URL,
15-
"script",
16-
&script_name,
17-
];
8+
let args = vec!["--url", URL, "script", &script_name];
189

1910
let snapbox = Command::new(cargo_bin!("sncast"))
2011
.current_dir(SCRIPTS_DIR.to_owned() + "/misc")
@@ -29,16 +20,7 @@ async fn test_happy_case() {
2920
#[tokio::test]
3021
async fn test_failing() {
3122
let script_name = "call_fail";
32-
let args = vec![
33-
"--accounts-file",
34-
"../../accounts/accounts.json",
35-
"--account",
36-
"user1",
37-
"--url",
38-
URL,
39-
"script",
40-
&script_name,
41-
];
23+
let args = vec!["--url", URL, "script", &script_name];
4224

4325
let snapbox = Command::new(cargo_bin!("sncast"))
4426
.current_dir(SCRIPTS_DIR.to_owned() + "/misc")

docs/src/starknet/script.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,14 @@ version = "0.1.0"
6666

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

7272
To run the script, do:
7373

7474
```shell
7575
$ sncast \
7676
--url http://127.0.0.1:5050 \
77-
--account example_user \
7877
script my_script
7978

8079
command: script
@@ -142,7 +141,7 @@ version = "0.1.0"
142141

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

148147
[lib]

0 commit comments

Comments
 (0)