Skip to main content

Contract Discovery

Find deployed contracts and inspect their details with xyz program list and xyz program info.

List Contracts

List all contracts deployed from a specific code ID:

Example

Output:

Options

With Custom Limit

Contract Info

Get detailed information about a specific contract:

Example

Output:

Options

With Code Hash

Output:

With History

Output:

JSON Output

Using xyzd

For more advanced queries:

List All Codes

Output:

Contracts by Creator

Contract State (Raw)

Discovery Workflow

Find Your Contracts

  1. List all codes you’ve uploaded:
  2. List contracts for each code:
  3. 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 migrate
  • Admin: 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

The code ID may have no instances:
Verify the address is correct:
If you have many contracts, use pagination: