You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
- Added support for viewing emitted logs when making a transaction using
forc-call
- Added `show_receipts` param (default-false) - so we can optionally
prnt out all receipts
- The CLI output becomes too long for a call with multiple receipts;
this is a minor UI enhancement
Addresses #6887
## Example usage/output
```sway
script;
struct ExampleParams {
test_val: u32,
test_str: str,
test_tuple: (u32, u64),
}
fn main() -> u64 {
log("hiiii");
log(123);
log(ExampleParams { test_val: 5, test_str: "hello world", test_tuple: (1,2) });
5
}
```
<img width="986" alt="image"
src="https://github.com/user-attachments/assets/3725ff17-29c9-43d7-98cc-4cacfc213ecb"
/>
## Checklist
- [x] I have linked to any relevant issues.
- [x] I have commented my code, particularly in hard-to-understand
areas.
- [ ] I have updated the documentation where relevant (API docs, the
reference, and the Sway book).
- [x] If my change requires substantial documentation changes, I have
[requested support from the DevRel
team](https://github.com/FuelLabs/devrel-requests/issues/new/choose)
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [ ] I have added (or requested a maintainer to add) the necessary
`Breaking*` or `New Feature` labels where relevant.
- [ ] I have done my best to ensure that my PR adheres to [the Fuel Labs
Code Review
Standards](https://github.com/FuelLabs/rfcs/blob/master/text/code-standards/external-contributors.md).
- [ ] I have requested a review from the relevant team or maintainers.
---------
Co-authored-by: z <zees-dev@users.noreply.github.com>
Co-authored-by: Joshua Batty <joshpbatty@gmail.com>
Co-authored-by: kayagokalp <kayagokalp123@gmail.com>
The function signature to call. When ABI is provided, this should be a selector (e.g. "transfer") When no ABI is provided, this should be the full function signature (e.g. "transfer(address,u64)")
78
-
79
-
[FUNCTION_ARGS]...
80
-
Arguments to pass into the function to be called
81
-
82
-
Options:
83
-
--abi <ABI>
84
-
Path or URI to a JSON ABI file
85
-
86
-
--node-url <NODE_URL>
87
-
The URL of the Fuel node to which we're submitting the transaction. If unspecified, checks the manifest's `network` table, then falls back to `http://127.0.0.1:4000`
88
-
89
-
You can also use `--target`, `--testnet`, or `--mainnet` to specify the Fuel node.
90
-
91
-
[env: FUEL_NODE_URL=]
92
-
93
-
--target <TARGET>
94
-
Preset configurations for using a specific target.
95
-
96
-
You can also use `--node-url`, `--testnet`, or `--mainnet` to specify the Fuel node.
97
-
98
-
Possible values are: [local, testnet, mainnet]
99
-
100
-
--mainnet
101
-
Use preset configuration for mainnet.
102
-
103
-
You can also use `--node-url`, `--target`, or `--testnet` to specify the Fuel node.
104
-
105
-
--testnet
106
-
Use preset configuration for testnet.
107
-
108
-
You can also use `--node-url`, `--target`, or `--mainnet` to specify the Fuel node.
109
-
110
-
--devnet
111
-
Use preset configuration for devnet.
112
-
113
-
You can also use `--node-url`, `--target`, or `--testnet` to specify the Fuel node.
114
-
115
-
--signing-key <SIGNING_KEY>
116
-
Derive an account from a secret key to make the call
117
-
118
-
[env: SIGNING_KEY=]
119
-
120
-
--wallet
121
-
Use forc-wallet to make the call
122
-
123
-
--amount <AMOUNT>
124
-
Amount of native assets to forward with the call
125
-
126
-
[default: 0]
127
-
128
-
--asset-id <ASSET_ID>
129
-
Asset ID to forward with the call
130
-
131
-
--gas-forwarded <GAS_FORWARDED>
132
-
Amount of gas to forward with the call
133
-
134
-
--mode <MODE>
135
-
The execution mode to use for the call; defaults to dry-run; possible values: dry-run, simulate, live
136
-
137
-
[default: dry-run]
138
-
139
-
--gas-price <PRICE>
140
-
Gas price for the transaction
141
-
142
-
--script-gas-limit <SCRIPT_GAS_LIMIT>
143
-
Gas limit for the transaction
144
-
145
-
--max-fee <MAX_FEE>
146
-
Max fee for the transaction
147
-
148
-
--tip <TIP>
149
-
The tip for the transaction
150
-
151
-
--external-contracts <EXTERNAL_CONTRACTS>
152
-
The external contract addresses to use for the call If none are provided, the call will automatically populate external contracts by making a dry-run calls to the node, and extract the contract addresses based on the revert reason
153
-
154
-
--output <OUTPUT>
155
-
The output format to use; possible values: default, raw
156
-
157
-
[default: default]
158
-
159
-
-h, --help
160
-
Print help (see a summary with '-h')
161
-
162
-
-V, --version
163
-
Print version
164
-
```
165
-
166
-
</details>
167
-
168
58
## Type Encoding
169
59
170
60
When passing arguments to contract functions, values are encoded according to their Sway types.
0 commit comments