setComponents

To define the investment strategy for a given vault, the vault admin calls the setComponents function. As shown in the code sample, it is required that the calling address be either the vault manager contract or an admin:

function setComponents(Component[] memory _components) public {
    require(msg.sender == config.managerAddress() || isAdmin(msg.sender), "only manager or admin"); 

}

Last updated