Skip to main content
The Registry is a central address book. Every protocol contract resolves peer contract addresses through the Registry at runtime rather than storing them as constructor constants. This enables safe protocol upgrades — updating a Registry entry propagates to all contracts automatically. Testnet address: CC35XWCH7SCQROTNW7PA6HZKP4JMNSVV2K7CX3HY2PSI2MI2ZQQH73ID

Stored Addresses

The Registry stores addresses for every protocol component:

Account Management Functions

The Registry also stores user account data.

add_account

Records a new SmartAccount for trader. Called by AccountManager during create_account(). Authorization: AccountManager only

update_account

Updates the active SmartAccount address for trader. Called when reusing an inactive account.

get_accounts

Returns all SmartAccount addresses ever associated with trader (active and historical). This is the primary way to look up a user’s margin account address.

get_smart_account_hash

Returns the WASM hash used to deploy new SmartAccount instances.

Address Getter Functions

Each stored address has a corresponding getter:

Address Setter Functions

Each stored address has a setter callable by the admin:
All setters require admin authorization.

Querying the Registry (TypeScript Example)