Skip to content

Commit 3e259d6

Browse files
committed
upd forc-call docs
1 parent 9f6255f commit 3e259d6

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

docs/book/src/testing/testing_with_forc_call.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,39 @@ forc call \
6868

6969
## Usage
7070

71-
The basic syntax for `forc call` is:
71+
Forc call has **3** usage modes:
72+
73+
### List functions
74+
75+
Syntax for `forc call` for listing supported functions from the ABI - with example command to perform call operation:
76+
77+
```bash
78+
forc call --abi <ABI-PATH/URL> <CONTRACT_ID> --list-functions
79+
```
80+
81+
Where the following arguments are required:
82+
83+
- `ABI-PATH/URL` is the path or URL to the contract's JSON ABI file
84+
- `CONTRACT_ID` is the ID of the deployed contract you want to interact with
85+
86+
### Transfer assets
87+
88+
Syntax for `forc call` for transferring assets:
89+
90+
```bash
91+
forc call <RECEIVER_ADDRESS> --amount <AMOUNT> --mode=live
92+
```
93+
94+
Where the following arguments are required:
95+
96+
- `RECEIVER_ADDRESS` is address of the receiver (identity or contract).
97+
- `AMOUNT` is the amount of assets to transfer.
98+
99+
Note: only live mode `--mode=live` is supported; transfers cannot be simulated.
100+
101+
### Call contracts
102+
103+
Syntax for `forc call` for contract calls:
72104

73105
```bash
74106
forc call [OPTIONS] --abi <ABI-PATH/URL> <CONTRACT_ID> <SELECTOR> [ARGS]...

0 commit comments

Comments
 (0)