Skip to main content

IOrchestrator.sol

Details

Interface of the Orchestrator.

Methods

actionApprovalByUser(uint256,address)

Solidity

function actionApprovalByUser(uint256 _actionId, address _member) external view returns (uint8)
Details

Returns true if an action with given _actionId is approved by _member of the group.

Parameters

NameTypeDescription
_actionIduint256undefined
_memberaddressundefined

Returns

NameTypeDescription
_0uint8undefined

actionApprovalStatus(uint256)

Solidity

function actionApprovalStatus(uint256 _actionId) external view returns (uint8)
Details

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

NameTypeDescription
_actionIduint256undefined

Returns

NameTypeDescription
_0uint8undefined

actionCount()

Solidity

function actionCount() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

actionThresholdPercent()

Solidity

function actionThresholdPercent() external view returns (uint16)

Returns

NameTypeDescription
_0uint16undefined

action_approvals(uint256,address)

Solidity

function action_approvals(uint256, address) external view returns (uint8)

Parameters

NameTypeDescription
_0uint256undefined
_1addressundefined

Returns

NameTypeDescription
_0uint8undefined

approveAction(uint256,uint8)

Solidity

function approveAction(uint256 _actionId, uint8 _vote) external nonpayable returns (bool)
Details

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

NameTypeDescription
_actionIduint256undefined
_voteuint8undefined

Returns

NameTypeDescription
_0boolundefined

createAction(bytes4[],bytes[],address,bytes32,address[])

Solidity

function createAction(bytes4[] _methods, bytes[] _args, address targetAddress, bytes32 _hash, address[] _recipients) external nonpayable returns (uint256 actionId)
Details

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

NameTypeDescription
_methodsbytes4[]undefined
_argsbytes[]undefined
targetAddressaddressundefined
_hashbytes32undefined
_recipientsaddress[]undefined

Returns

NameTypeDescription
actionIduint256undefined

executeAction(uint256,bytes[])

Solidity

function executeAction(uint256 _actionId, bytes[] dynamicData) external nonpayable returns (enum IOrchestrator.actionState)
Details

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

NameTypeDescription
_actionIduint256undefined
dynamicDatabytes[]undefined

Returns

NameTypeDescription
_0enum IOrchestrator.actionStateundefined

getActionInfo(uint256)

Solidity

function getActionInfo(uint256 _actionId) external view returns (bytes4[] methods, bytes[] args, address targetAddress, enum IOrchestrator.actionState state)
Details

Returns the details of an already created action/proposal given by _actionId which is open for approval for all members of the group.

Parameters

NameTypeDescription
_actionIduint256undefined

Returns

NameTypeDescription
methodsbytes4[]undefined
argsbytes[]undefined
targetAddressaddressundefined
stateenum IOrchestrator.actionStateundefined

setGasVault(address)

Solidity

function setGasVault(address _gasVault) external nonpayable

Parameters

NameTypeDescription
_gasVaultaddressundefined

Events

ActionCreated

Solidity

event ActionCreated(uint256 _actionId, address _from, enum IOrchestrator.actionState _state, bytes32 _hash, address[] _recipients)
Details

MUST trigger when actions are created.

Parameters

NameTypeDescription
_actionIduint256undefined
_fromaddressundefined
_stateenum IOrchestrator.actionStateundefined
_hashbytes32undefined
_recipientsaddress[]undefined

ActionExecuted

Solidity

event ActionExecuted(uint256 _actionId, address _from, uint256 _rewardPerRequest)
Details

MUST trigger when actions are executed.

Parameters

NameTypeDescription
_actionIduint256undefined
_fromaddressundefined
_rewardPerRequestuint256undefined

ActionRejected

Solidity

event ActionRejected(uint256 _actionId, address _from)

Parameters

NameTypeDescription
_actionIduint256undefined
_fromaddressundefined

actionFailed

Solidity

event actionFailed(uint256 _actionId)

Parameters

NameTypeDescription
_actionIduint256undefined

vote

Solidity

event vote(uint256 _actionId, address _from, uint8 _approved)

Parameters

NameTypeDescription
_actionIduint256undefined
_fromaddressundefined
_approveduint8undefined