Contract Discovery
Find deployed contracts and inspect their details withxyz program list and xyz program info.
List Contracts
List all contracts deployed from a specific code ID:Example
Options
| Flag | Description | Default |
|---|---|---|
--limit | Max results | 10 |
With Custom Limit
Contract Info
Get detailed information about a specific contract:Example
Options
| Flag | Description |
|---|---|
--hash | Include code hash |
--history | Show migration history |
--json | JSON output |
With Code Hash
With History
JSON Output
Using xyzd
For more advanced queries:List All Codes
Contracts by Creator
Contract State (Raw)
Discovery Workflow
Find Your Contracts
-
List all codes you’ve uploaded:
-
List contracts for each code:
-
Get details on specific contract:
Find Contracts by Label
Export Contract List
Contract Properties
Admin
The admin can:- Migrate the contract to new code
- Update the admin
- Clear the admin (make immutable)
Admin: xyz1admin...- Admin can migrateAdmin: None - immutable- No admin, cannot change
Code ID
Identifies the contract code (bytecode):- Same code ID = same logic
- Different instances can have different state
- Upgrading changes the code ID
Creator
The address that deployed the contract (cannot be changed).Scripting Examples
List All Your Contracts
Monitor Contract Info
Verify Contract Code
Troubleshooting
No contracts found
No contracts found
The code ID may have no instances:
Contract not found
Contract not found
Verify the address is correct:
Pagination
Pagination
If you have many contracts, use pagination: