Skip to content

Commit d9383ca

Browse files
authored
Merge pull request #247 from AztecProtocol/docs/read-logs-documentation
Document read-logs script and utility function
2 parents 8437b40 + 22e2ee8 commit d9383ca

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CLAUDE.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ yarn deploy::devnet # Deploy contract to devnet
5555
yarn deploy-account # Deploy a Schnorr account
5656
yarn multiple-wallet # Deploy from one wallet, interact from another
5757
yarn profile # Profile a transaction deployment
58+
yarn read-logs # Demo utility function for client-side debug logging
59+
yarn read-logs::devnet # Same on devnet
5860
```
5961

6062
## Environment Configuration

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ You can find a handful of scripts in the `./scripts` folder.
174174
- `./scripts/profile_deploy.ts` shows how to profile a transaction and print the results.
175175
- `./scripts/interaction_existing_contract.ts` demonstrates how to interact with an already deployed pod racing contract, including creating games.
176176
- `./scripts/get_block.ts` is an example of how to retrieve and display block information from the Aztec node.
177+
- `./scripts/read_debug_logs.ts` demonstrates the `#[external("utility")]` pattern for client-side state inspection — runs a full game lifecycle, then calls the `debug_game_state` utility function to read public state and log it via `debug_log_format` without an on-chain transaction. Run with `yarn read-logs` (`LOG_LEVEL` is pre-configured by the yarn script).
177178

178179
### Utility Functions
179180

0 commit comments

Comments
 (0)