IOrchestrator_v1.sol
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
moduleFactory_
address
The address of the module factory.
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
initiateSetFundingManagerWithTimelock
Initiates replaces the current funding manager with fundingManager_ on a timelock.
Only callable by authorized caller.
Parameters
initiateSetPaymentProcessorWithTimelock
Initiates replaces the current payment processor with paymentProcessor_ on a timelock.
Only callable by authorized caller.
Parameters
cancelAuthorizerUpdate
Cancels the replacement of the current authorizer with authorizer_.
Only callable by authorized caller.
Parameters
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
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
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
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
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
initiateAddModuleWithTimelock
Initiates the adding of a module to the {Orchestrator_v1} 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
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
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
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
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_v1}.
Only callable by authorized address.
Fails if module update has not been initiated.
Parameters
module
address
The module address to remove.
orchestratorId
Returns the {Orchestrator_v1}'s id.
Unique id set by the {OrchestratorFactory_v1} during initialization.
Returns
fundingManager
The {IFundingManager_v1} implementation used to hold and distribute Funds.
Returns
authorizer
The {IAuthorizer_v1} implementation used to authorize addresses.
Returns
paymentProcessor
The {IPaymentProcessor_v1} implementation used to process module payments.
Returns
governor
The {IGovernor_v1} implementation used for protocol level interactions.
Returns
Events
AuthorizerUpdated
Authorizer updated to new address.
Parameters
_address
address
The new address.
FundingManagerUpdated
FundingManager updated to new address.
Parameters
_address
address
The new address.
PaymentProcessorUpdated
PaymentProcessor updated to new address.
Parameters
_address
address
The new address.
OrchestratorInitialized
{Orchestrator_v1} has been initialized with the corresponding modules.
Parameters
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
role
bytes32
The role of the caller.
caller
address
The caller address.
Orchestrator__InvalidModuleType
The given module is not used in the {Orchestrator_v1}.
Parameters
module
address
The module address.
Orchestrator__MismatchedTokenForFundingManager
The token of the new funding manager is not the same as the current funding manager.
Parameters
currentToken
address
The current token.
newToken
address
The new token.
Orchestrator__DependencyInjection__ModuleNotUsedInOrchestrator
The given module is not used in the {Orchestrator_v1}.
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