Registry
IntegrationRegistry.sol
The Integration Registry holds state relating to the Modules and the integrations they are connected with. The state is combined into a single Registry to allow governance updates to be aggregated to one contract.
function addIntegration( address _module, string memory _name, address _adapter) public
Add a new Integration to registry, integration is an entity which represents external components e.g. uniswap. Administrative function only called by owner.
- _module The address of the module associated with the integration i.e. TradeModule, SingleIndexModule
- _name Human readable string identifying the integration
- _adapter Address of the adapter contract to add
function batchAddIntegration(address[] memory _modules, string[] memory _names, address[] memory _adapters) external
Like previous function call batchAddIntegration adds integrations in mass to the registry. Administrative function only called by owner.
- _modules Array of addresses of the modules associated with integration
- _names Array of human readable strings identifying the integration
- _adapters Array of addresses of the adapter contracts to add
function editIntegration(address _module, string memory _name, address _adapter) public
Modify an already added integration
- _module The address of the module associated with the integration
- _name Human readable string identifying the integration
- _adapter Address of the adapter contract to edit
function removeIntegration(address _module, string memory _name) external
Remove an existing integration on the registry. Administrative function only called by owner.
- _module The address of the module associated with the integration
- _name Human readable string identifying the integration
function getIntegrationAdapter(address _module, string memory _name) external view returns (address)
Get integration adapter address which have been already added on the registry associated with passed human readable name.
- _module The address of the module associated with the integration
- _name Human readable adapter name
- return Address of adapter
function isValidIntegration(address _module, string memory _name) external view returns (bool)
Check if adapter is valid i.e. added on the registry
- _module The address of the module associated with the integration
- _name Human readable string identifying the integration
- return Boolean indicating if valid