Skip to main content

IOrchestrator.sol

Details

Interface of the Orchestrator.

Methods

actionApprovalStatus(bytes32)

Solidity

function actionApprovalStatus(bytes32 actionHash) external view returns (bool)
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
actionHashbytes32undefined

Returns

NameTypeDescription
_0boolundefined

actionThresholdPercent()

Solidity

function actionThresholdPercent() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

actions(bytes32)

Solidity

function actions(bytes32) external view returns (enum IOrchestrator.ActionState)

Parameters

NameTypeDescription
_0bytes32undefined

Returns

NameTypeDescription
_0enum IOrchestrator.ActionStateundefined

executeAction(address,uint256,bytes[],uint256[],bytes32)

Solidity

function executeAction(address targetAddress, uint256 jobEpoch, bytes[] calldatas, uint256[] timeIndependentLengths, bytes32 jobHash) external nonpayable returns (enum IOrchestrator.ActionState)
Details

Executes the action referenced by the given actionId as long as it is approved actionThresholdPercent of 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.

Parameters

NameTypeDescription
targetAddressaddressis the address which will be receiving the action's calls.
jobEpochuint256is the job epoch of this action.
calldatasbytes[]is the COMPLETE calldata of each method to be called note that the hash is created using the sliced calldata, but here it must be complete or the method will revert.
timeIndependentLengthsuint256[]--For each calldata, the number of bytes that is NOT time-sensitive. If no calldatas are time-sensitive, just pass an empty array.
jobHashbytes32is the identifier for the job this action is related to. This is used for DynamicJobs to identify separate jobs to the subgraph.

Returns

NameTypeDescription
_0enum IOrchestrator.ActionStateactionState corresponding to post-execution action state. Pending if execution failed, Completed if execution succeeded.

gasVault()

Solidity

function gasVault() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

initialize(address,uint256)

Solidity

function initialize(address _keeperRegistry, uint256 _rewardPerAction) external nonpayable
Details

initialize the Orchestrator

Parameters

NameTypeDescription
_keeperRegistryaddressaddress of the keeper registry
_rewardPerActionuint256is # of SteerToken to give to operator nodes for each completed action (currently unused)

keeperRegistry()

Solidity

function keeperRegistry() external view returns (address)

Returns

NameTypeDescription
_0addressundefined

rewardPerAction()

Solidity

function rewardPerAction() external view returns (uint256)

Returns

NameTypeDescription
_0uint256undefined

setGasVault(address)

Solidity

function setGasVault(address _gasVault) external nonpayable
Details

allows owner to set/update gas vault address. Mainly used to resolve mutual dependency.

Parameters

NameTypeDescription
_gasVaultaddressundefined

setRewardPerAction(uint256)

Solidity

function setRewardPerAction(uint256 _rewardPerAction) external nonpayable
Details

set the reward given to operator nodes for their participation in a strategy calculation

Parameters

NameTypeDescription
_rewardPerActionuint256is amount of steer token to be earned as a reward, per participating operator node per action.

voteBitmaps(bytes32)

Solidity

function voteBitmaps(bytes32) external view returns (uint256)

Parameters

NameTypeDescription
_0bytes32undefined

Returns

NameTypeDescription
_0uint256undefined

voteOnAction(bytes32,bool)

Solidity

function voteOnAction(bytes32 actionHash, bool vote) external nonpayable
Details

vote (if you are a keeper) on a given action proposal

Parameters

NameTypeDescription
actionHashbytes32is the hash of the action to be voted on
voteboolis the vote to be cast. false: reject, true: approve. false only has an effect if the keeper previously voted true. It resets their vote to false.

Events

ActionExecuted

Solidity

event ActionExecuted(bytes32 indexed actionHash, address from, uint256 rewardPerAction)
Details

MUST trigger when actions are executed.

Parameters

NameTypeDescription
actionHash indexedbytes32: keccak256(targetAddress, jobEpoch, calldatas) used to identify this action
fromaddress: the address of the keeper that executed this action
rewardPerActionuint256: SteerToken reward for this action, to be supplied to operator nodes.

ActionFailed

Solidity

event ActionFailed(bytes32 indexed actionHash)

Parameters

NameTypeDescription
actionHash indexedbytes32undefined

Vote

Solidity

event Vote(bytes32 indexed actionHash, address indexed from, bool approved)

Parameters

NameTypeDescription
actionHash indexedbytes32undefined
from indexedaddressundefined
approvedboolundefined