Skip to content

require(_componentIdByName[component.getName()] == 0) #116

Description

@rapidddenis

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions