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
If the `run` command is successful, you should see logs similar to this:
155
154
156
155
```bash
157
-
user@user-MacBook-Pro counter % cartesi run
158
-
(node:5404) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
159
-
(Use `node --trace-warnings ...` to show where the warning was created)
160
-
WARNING: default block is set to 'latest', production configuration will likely use 'finalized'
161
-
[+] Pulling 4/0
162
-
✔ database Skipped - Image is already present locally
163
-
✔ rollups-node Skipped - Image is already present locally
164
-
✔ anvil Skipped - Image is already present locally
165
-
✔ proxy Skipped - Image is already present locally
166
-
✔ counter starting at http://127.0.0.1:6751
167
-
✔ anvil service ready at http://127.0.0.1:6751/anvil
168
-
✔ rpc service ready at http://127.0.0.1:6751/rpc
169
-
✔ inspect service ready at http://127.0.0.1:6751/inspect/counter
170
-
✔ counter machine hash is 0x107174e04a294787e22b6864c61fedd845833e5c8bc9a244480f2996ddabb3c7
171
-
✔ counter contract deployed at 0x94b32605a405d690934eb4ecc91856febfa747cc
172
-
(l) View logs (b) Build and redeploy (q) Quit
156
+
Attaching to prompt-1, validator-1
157
+
validator-1 | 2025-11-24 17-06-12 info remote-cartesi-machine pid:108 ppid:67 Initializing server on localhost:0
158
+
prompt-1 | Anvil running at http://localhost:8545
159
+
prompt-1 | GraphQL running at http://localhost:8080/graphql
160
+
prompt-1 | Inspect running at http://localhost:8080/inspect/
161
+
prompt-1 | Explorer running at http://localhost:8080/explorer/
162
+
prompt-1 | Bundler running at http://localhost:8080/bundler/rpc
163
+
prompt-1 | Paymaster running at http://localhost:8080/paymaster/
164
+
prompt-1 | Press Ctrl+C to stop the node
173
165
```
174
166
175
167
## Interacting with your Counter Application
@@ -181,59 +173,56 @@ Interacting with your Counter application could be achieved either through initi
181
173
We start by querying the current count value, this is done by making an inspect request to the counter application running locally, to achieve this we run the below command in a new terminal:
182
174
183
175
```bash
184
-
curl -X POST http://127.0.0.1:6751/inspect/counter \
185
-
-H "Content-Type: application/json" \
186
-
-d '{""}'
176
+
curl http://localhost:8080/inspect/counter
187
177
```
188
178
189
-
:::note Inspect endpoint
190
-
Please note that if your application is running on a different port or your application is not named `counter` as in the guide, then you'll need to replace the inspect endpoint `http://127.0.0.1:6751/inspect/counter` with the endpoint provided after running the `cartesi run` command.
191
-
:::
192
-
193
-
On success, we receive a confirmation response from the HTTP server, something similar to `{"status":"Accepted","reports":null,"processed_input_count":0}`, then on the terminal running our application when we press the `l` key to access our application logs we should get a log confirming that our application received the inspect call and should also contain a log of the current count value.
179
+
On success, we receive a confirmation response from the HTTP server, something similar to `{"status":"Accepted","exception_payload":null,"reports":[],"processed_input_count":0}`, then on the terminal running our application we should get a log confirming that our application received the inspect call and should also contain a log of the current count value.
194
180
195
181
```bash
196
-
[INFO rollup_http_server::http_service] received new request of type INSPECT
As seen in the third to last line of our received log, we can see the `count value` returned to be `0`
190
+
As seen in the second to last line of our received log, we can see the `counter value` returned to be `0`
207
191
208
192
### 2. Increase count value
209
193
210
194
Now that we've confirmed our count value to be zero (0), we would be sending an advance request using the CLI to increase the value of our counter by running the below command:
211
195
212
196
```bash
213
-
cartesi send random_text
197
+
cartesi send generic
214
198
```
215
199
216
-
The above command sends an advance request with the payload "random_text" to our application, which ignores this payload then proceeds to increase out count value by `one (1)`, if this command is successful and our application process this request graciously, we should get a log similar to what's presented below on the terminal running our application:
200
+
We then proceed by selecting Foundry and pressing Enter twice to accept the default RPC URL. Next, we choose Mnemonic as the authentication method and again press Enter twice to use the default mnemonic and wallet address. After that, we press Enter once more to confirm the application address.
201
+
202
+
Once the basics are set, we navigate to and select String encoding as the input format. Finally, we type any random string (e.g., increase), press Enter, and the CLI sends the request to the application.
203
+
204
+
The above process sends an advance request with the payload "increase" to our application, which ignores this payload then proceeds to increase out count value by `one (1)`, if this command is successful and our application process this request graciously, we should get a log similar to what's presented below on the terminal running our application:
validator-1 | INFO:__main__:Counter increment requested, new count value: 1
212
+
validator-1 | INFO:__main__:Sending finish
222
213
```
223
214
224
215
The above logs prove that out application received the advance request, increased our count value, logs the updated count value then finishes that request successfully.
225
216
226
217
As seen in the second to last line of the log, our count value has been increased from 0 to 1. To confirm this increase, we can run an inspect request once more to verify the current count value, and on running the same inspect command as last time, we obtain the updated logs below.
227
218
228
219
```shell
229
-
[INFO rollup_http_server::http_service] received new request of type INSPECT
From the latest application logs, it's now clear that the application's count value has been increased from 0 to one, and subsequent advance calls would further increase the count value.
0 commit comments