CHREGv1
Inherits: Module
Olympus Clearinghouse Registry (Module) Contract
The Olympus Clearinghouse Registry Module tracks the lending facilities that the Olympus protocol deploys to satisfy the Cooler Loan demand. This allows for a single-source of truth for reporting purposes around the total Treasury holdings as well as its projected receivables.
State Variables
activeCount
Count of active and historical clearinghouses.
These are useless variables in contracts, but useful for any frontends or off-chain requests where the array is not easily accessible.
uint256 public activeCount;
registryCount
uint256 public registryCount;
active
Tracks the addresses of all the active Clearinghouses.
address[] public active;
registry
Historical record of all the Clearinghouse addresses.
address[] public registry;
Functions
activateClearinghouse
Adds a Clearinghouse to the registry. Only callable by permissioned policies.
function activateClearinghouse(address clearinghouse_) external virtual;
Parameters
Name | Type | Description |
---|---|---|
clearinghouse_ | address | The address of the clearinghouse. |
deactivateClearinghouse
Deactivates a clearinghouse from the registry. Only callable by permissioned policies.
function deactivateClearinghouse(address clearinghouse_) external virtual;
Parameters
Name | Type | Description |
---|---|---|
clearinghouse_ | address | The address of the clearinghouse. |
Events
ClearinghouseActivated
Logs whenever a Clearinghouse is activated. If it is the first time, it is also added to the registry.
event ClearinghouseActivated(address indexed clearinghouse);
ClearinghouseDeactivated
Logs whenever an active Clearinghouse is deactivated.
event ClearinghouseDeactivated(address indexed clearinghouse);
Errors
CHREG_InvalidConstructor
error CHREG_InvalidConstructor();
CHREG_NotActivated
error CHREG_NotActivated(address clearinghouse_);
CHREG_AlreadyActivated
error CHREG_AlreadyActivated(address clearinghouse_);