|
function propose(IComponent component) |
|
external |
|
onlyComponentOwnerService |
|
{ |
|
// input validation |
|
require(_componentIdByAddress[address(component)] == 0, "ERROR:CCR-003:COMPONENT_ALREADY_EXISTS"); |
|
require(_componentIdByName[component.getName()] == 0, "ERROR:CCR-004:COMPONENT_NAME_ALREADY_EXISTS"); |
Component is considered as external arbitrary contract. Better not to rely on it during require.
Ideally controller MUST read and store component data (type, name, policy flow, risk pool ID) only once and in one call.
gif-contracts/contracts/modules/ComponentController.sol
Lines 45 to 51 in b58fd27
Component is considered as external arbitrary contract. Better not to rely on it during
require.Ideally controller MUST read and store component data (type, name, policy flow, risk pool ID) only once and in one call.