File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,39 @@ forc call \
68
68
69
69
## Usage
70
70
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:
72
104
73
105
``` bash
74
106
forc call [OPTIONS] --abi < ABI-PATH/URL> < CONTRACT_ID> < SELECTOR> [ARGS]...
You can’t perform that action at this time.
0 commit comments