Read contract state
$ qinit state Counter• Counter state
counter 1Qinit decodes the state from the contract source the node holds, so the fields always match what is deployed. A local qinit.idl.json is not used for decoded state.
Containers are listed with their occupancy, and long empty runs are skipped:
$ qinit state Balances• Balances state
total 125
[1] balances · 2 entries · 1022/1024 slots unoccupied
slot[0] AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFXIB
= 100
slots[1..286] (unoccupied ×286; skipped)
slot[287] BZBQFLLBNCXEMGLOBHUVFTLUPLVCPQUASSILFABOFFBCADQSSUPNWLZBQEXK
= 25
slots[288..1023] (unoccupied ×736; skipped)A large container stays collapsed until you ask for it by its index, or for all of them:
qinit state Balances --container 1
qinit state Balances --allUse a digest when you only need to compare state, or dump the exact bytes for offline work:
$ qinit state Counter --digest[state digest ✓]
╭───────────────────────────────────────────────────────────────────────────╮
│ slot 31 │
│ state size 8 │
│ digest 4e34329a1bac6e80862edb5e727be3d…d1169670a179622a21be84ff826f6e │
╰───────────────────────────────────────────────────────────────────────────╯$ qinit state Counter --dump --out counter-state.binA dumped file can start a contract later. See Migrate state.
Trace one call
$ qinit call --proc Counter Inc --trace✓ Counter.Inc processed
tx yeoftyjhyhdhvfnyuhyebbszetgaocdzkqowofljehibsenxvhubhrxgagef
tick 2777
✓ Counter proc#1 (Inc) 61µs · tick 2777
in {}
out {}
caller SINUBYSBZKBSVEFQDZBQWUEJWRXCXOZNKPHIXDZWRBKXDSPJEHFAMBACXHUN
state
counter 1 → 2--trace shows the captured invocation: entry, input and output, caller, nested calls, logs, and state changes. --trace-full also expands container details. It implies --trace.
The state shown in a trace is the change recorded for that call. Use qinit state when you want the contract's current state.
Watch calls live
$ qinit debug CounterKeep it open in one terminal and make calls in another. Pick a trace to inspect its inputs, outputs, nested calls, logs, and state diff.
For chain-level lookup, open the explorer:
qinit explorer
qinit explorer 7474