IOrchestrator.sol
Interface of the Orchestrator.
Methods
actionApprovalByUser(uint256,address)
function actionApprovalByUser(uint256 _actionId, address _member) external view returns (uint8)
Returns true if an action with given _actionId is approved by _member of the group.
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
| _member | address | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint8 | undefined |
actionApprovalStatus(uint256)
function actionApprovalStatus(uint256 _actionId) external view returns (uint8)
Returns true if an action with given _actionId is approved by all existing members of the group. It’s up to the contract creators to decide if this method should look at majority votes (based on ownership) or if it should ask consent of all the users irrespective of their ownerships.
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint8 | undefined |
actionCount()
function actionCount() external view returns (uint256)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
actionThresholdPercent()
function actionThresholdPercent() external view returns (uint16)
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint16 | undefined |
action_approvals(uint256,address)
function action_approvals(uint256, address) external view returns (uint8)
Parameters
| Name | Type | Description |
|---|---|---|
| _0 | uint256 | undefined |
| _1 | address | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | uint8 | undefined |
approveAction(uint256,uint8)
function approveAction(uint256 _actionId, uint8 _vote) external nonpayable returns (bool)
Allows an existing _member of the group to vote on an already created action/proposal given by _actionId which is open for approval for all members of the group. Emits an {ActionStateChanged} event.
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
| _vote | uint8 | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | undefined |
createAction(bytes4[],bytes[],address,bytes32,address[])
function createAction(bytes4[] _methods, bytes[] _args, address targetAddress, bytes32 _hash, address[] _recipients) external nonpayable returns (uint256 actionId)
Create an action/proposal which is open for approval for all members of the group. An action consists of one or more methods that have to be executed once it's approved. Only an existing member can create an action. Returns the actionId of the created action. Emits an {ActionStateChanged} event.
Parameters
| Name | Type | Description |
|---|---|---|
| _methods | bytes4[] | undefined |
| _args | bytes[] | undefined |
| targetAddress | address | undefined |
| _hash | bytes32 | undefined |
| _recipients | address[] | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| actionId | uint256 | undefined |
executeAction(uint256,bytes[])
function executeAction(uint256 _actionId, bytes[] dynamicData) external nonpayable returns (enum IOrchestrator.actionState)
Executes the action referenced by the given _actionId as long as it is approved by all existing members of the group. The executeAction executes all methods as part of given action in an atomic way (either all should succeed or none should succeed). Once executed, the action should be set as executed (state=3) so that it cannot be executed again. Emits an {ActionStateChanged} event.
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
| dynamicData | bytes[] | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| _0 | enum IOrchestrator.actionState | undefined |
getActionInfo(uint256)
function getActionInfo(uint256 _actionId) external view returns (bytes4[] methods, bytes[] args, address targetAddress, enum IOrchestrator.actionState state)
Returns the details of an already created action/proposal given by _actionId which is open for approval for all members of the group.
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
Returns
| Name | Type | Description |
|---|---|---|
| methods | bytes4[] | undefined |
| args | bytes[] | undefined |
| targetAddress | address | undefined |
| state | enum IOrchestrator.actionState | undefined |
setGasVault(address)
function setGasVault(address _gasVault) external nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| _gasVault | address | undefined |
Events
ActionCreated
event ActionCreated(uint256 _actionId, address _from, enum IOrchestrator.actionState _state, bytes32 _hash, address[] _recipients)
MUST trigger when actions are created.
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
| _from | address | undefined |
| _state | enum IOrchestrator.actionState | undefined |
| _hash | bytes32 | undefined |
| _recipients | address[] | undefined |
ActionExecuted
event ActionExecuted(uint256 _actionId, address _from, uint256 _rewardPerRequest)
MUST trigger when actions are executed.
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
| _from | address | undefined |
| _rewardPerRequest | uint256 | undefined |
ActionRejected
event ActionRejected(uint256 _actionId, address _from)
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
| _from | address | undefined |
actionFailed
event actionFailed(uint256 _actionId)
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
vote
event vote(uint256 _actionId, address _from, uint8 _approved)
Parameters
| Name | Type | Description |
|---|---|---|
| _actionId | uint256 | undefined |
| _from | address | undefined |
| _approved | uint8 | undefined |