IOrchestrator_v1.sol

Git Sourcearrow-up-right

Inherits: IModuleManagerBase_v1

Functions

init

Initialization function.

function init(
    uint orchestratorId,
    address moduleFactory_,
    address[] calldata modules,
    IFundingManager_v1 fundingManager,
    IAuthorizer_v1 authorizer,
    IPaymentProcessor_v1 paymentProcessor,
    IGovernor_v1 governor
) external;

Parameters

Name
Type
Description

orchestratorId

uint256

moduleFactory_

address

The address of the module factory.

modules

address[]

The addresses of the modules used in the {Orchestrator_v1}arrow-up-right.

fundingManager

IFundingManager_v1

The address of the {IFundingManager_v1} module.

authorizer

IAuthorizer_v1

The address of the {IAuthorizer_v1} module.

paymentProcessor

IPaymentProcessor_v1

The address of the {IPaymentProcessor_v1} module.

governor

IGovernor_v1

The address of the governor contract.

initiateSetAuthorizerWithTimelock

Initiates replacing the current authorizer with _authorizer on a timelock.

Only callable by authorized caller.

Parameters

Name
Type
Description

authorizer_

IAuthorizer_v1

The address of the new {IAuthorizer_v1} module.

initiateSetFundingManagerWithTimelock

Initiates replaces the current funding manager with fundingManager_ on a timelock.

Only callable by authorized caller.

Parameters

Name
Type
Description

fundingManager_

IFundingManager_v1

The address of the new {IFundingManager_v1} module.

initiateSetPaymentProcessorWithTimelock

Initiates replaces the current payment processor with paymentProcessor_ on a timelock.

Only callable by authorized caller.

Parameters

Name
Type
Description

paymentProcessor_

IPaymentProcessor_v1

The address of the new {PaymentProcessor_v1} module.

cancelAuthorizerUpdate

Cancels the replacement of the current authorizer with authorizer_.

Only callable by authorized caller.

Parameters

Name
Type
Description

authorizer_

IAuthorizer_v1

The address of the new {IAuthorizer_v1} module, for which the update is canceled.

cancelFundingManagerUpdate

Cancels the replacement of the current funding manager with fundingManager_.

Only callable by authorized caller.

Parameters

Name
Type
Description

fundingManager_

IFundingManager_v1

The address of the new {IFundingManager_v1} module, for which the update is canceled.

cancelPaymentProcessorUpdate

Cancels the replacement of the current payment processor with paymentProcessor_.

Only callable by authorized caller.

Parameters

Name
Type
Description

paymentProcessor_

IPaymentProcessor_v1

The address of the new {IPaymentProcessor_v1} module, for which the update is canceled.

executeSetAuthorizer

Executes replacing the current authorizer with _authorizer.

!!! IMPORTANT !!! When changing the Authorizer the current set of assigned addresses to Roles are lost. Make sure initial owners are set properly.

Only callable by authorized caller.

Parameters

Name
Type
Description

authorizer_

IAuthorizer_v1

The address of the new {IAuthorizer_v1} module.

executeSetFundingManager

Executes replaces the current funding manager with fundingManager_.

!!! IMPORTANT !!! When changing the FundingManager the current funds still contained in the module might not be retrievable. Make sure to clean the FundingManager properly beforehand.

Only callable by authorized caller.

Parameters

Name
Type
Description

fundingManager_

IFundingManager_v1

The address of the new {IFundingManager_v1} module.

executeSetPaymentProcessor

Executes replaces the current payment processor with paymentProcessor_.

!!! IMPORTANT !!! When changing the PaymentProcessor the current ongoing payment orders are lost. Make sure to resolve those payments properly beforehand.

Only callable by authorized caller.

Parameters

Name
Type
Description

paymentProcessor_

IPaymentProcessor_v1

The address of the new {IPaymentProcessor_v1} module.

initiateAddModuleWithTimelock

Initiates the adding of a module to the {Orchestrator_varrow-up-right1} on a timelock.

Only callable by authorized address.

Fails of adding module exeeds max modules limit.

Fails if address invalid or address already added as module.

Parameters

Name
Type
Description

module

address

The module address to add.

initiateRemoveModuleWithTimelock

Initiate the removal of a module from the {Orchestrator_v1} on a timelock.

Reverts if module to be removed is the current authorizer/fundingManager/paymentProcessor. The functions specific to updating these 3 module categories should be used instead.

Only callable by authorized address.

Fails if address not added as module.

Parameters

Name
Type
Description

module

address

The module address to remove.

executeAddModule

Adds address module as module.

Only callable by authorized address.

Fails if adding of module has not been initiated.

Fails if timelock has not been expired yet.

Parameters

Name
Type
Description

module

address

The module address to add.

executeRemoveModule

Removes address module as module.

Only callable by authorized address.

Fails if removing of module has not been initiated.

Fails if timelock has not been expired yet.

Parameters

Name
Type
Description

module

address

The module address to remove.

cancelModuleUpdate

Cancels an initiated update for a module. Can be adding or removing a module from the {Orchestrator_v1arrow-up-right}.

Only callable by authorized address.

Fails if module update has not been initiated.

Parameters

Name
Type
Description

module

address

The module address to remove.

orchestratorId

Returns the {Orchestrator_v1arrow-up-right}'s id.

Unique id set by the {OrchestratorFactory_v1} during initialization.

Returns

Name
Type
Description

<none>

uint256

fundingManager

The {IFundingManager_v1} implementation used to hold and distribute Funds.

Returns

Name
Type
Description

<none>

IFundingManager_v1

The {IFundingManager_v1} implementation.

authorizer

The {IAuthorizer_v1} implementation used to authorize addresses.

Returns

Name
Type
Description

<none>

IAuthorizer_v1

The {IAuthorizer_v1} implementation.

paymentProcessor

The {IPaymentProcessor_v1} implementation used to process module payments.

Returns

Name
Type
Description

<none>

IPaymentProcessor_v1

The {IPaymentProcessor_v1} implementation.

governor

The {IGovernor_v1} implementation used for protocol level interactions.

Returns

Name
Type
Description

<none>

IGovernor_v1

The {IGovernor_v1} implementation.

Events

AuthorizerUpdated

Authorizer updated to new address.

Parameters

Name
Type
Description

_address

address

The new address.

FundingManagerUpdated

FundingManager updated to new address.

Parameters

Name
Type
Description

_address

address

The new address.

PaymentProcessorUpdated

PaymentProcessor updated to new address.

Parameters

Name
Type
Description

_address

address

The new address.

OrchestratorInitialized

{Orchestrator_varrow-up-right1} has been initialized with the corresponding modules.

Parameters

Name
Type
Description

orchestratorId_

uint256

fundingManager

address

The address of the {IFundingManager_v1} module.

authorizer

address

The address of the {IAuthorizer_v1} module.

paymentProcessor

address

The address of the {IPaymentProcessor_v1} module.

modules

address[]

The addresses of the other modules used in the {Orchestrator_v1}arrow-up-right.

governor

address

The address of the {Governor_v1} contract used to reference protocol level interactions.

Errors

Orchestrator__CallerNotAuthorized

Function is only callable by authorized caller.

Parameters

Name
Type
Description

role

bytes32

The role of the caller.

caller

address

The caller address.

Orchestrator__InvalidModuleType

The given module is not used in the {Orchestrator_v1arrow-up-right}.

Parameters

Name
Type
Description

module

address

The module address.

Orchestrator__MismatchedTokenForFundingManager

The token of the new funding manager is not the same as the current funding manager.

Parameters

Name
Type
Description

currentToken

address

The current token.

newToken

address

The new token.

Orchestrator__DependencyInjection__ModuleNotUsedInOrchestrator

The given module is not used in the {Orchestrator_v1arrow-up-right}.

Orchestrator__InvalidRemovalOfAuthorizer

The Authorizer can not be removed through this function.

Orchestrator__InvalidRemovalOfFundingManager

The FundingManager can not be removed through this function.

Orchestrator__InvalidRemovalOfPaymentProcessor

The PaymentProcessor can not be removed through this function.

Last updated