IOrchestrator.sol
Interface of the Orchestrator.
Methods
actionApprovalStatus(bytes32)
function actionApprovalStatus(bytes32 actionHash) external view returns (bool)
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 |
---|---|---|
actionHash | bytes32 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
actionThresholdPercent()
function actionThresholdPercent() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
actions(bytes32)
function actions(bytes32) external view returns (enum IOrchestrator.ActionState)
Parameters
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | enum IOrchestrator.ActionState | undefined |
executeAction(address,uint256,bytes[],uint256[],bytes32)
function executeAction(address targetAddress, uint256 jobEpoch, bytes[] calldatas, uint256[] timeIndependentLengths, bytes32 jobHash) external nonpayable returns (enum IOrchestrator.ActionState)
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
Name | Type | Description |
---|---|---|
targetAddress | address | is the address which will be receiving the action's calls. |
jobEpoch | uint256 | is the job epoch of this action. |
calldatas | bytes[] | 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. |
timeIndependentLengths | uint256[] | --For each calldata, the number of bytes that is NOT time-sensitive. If no calldatas are time-sensitive, just pass an empty array. |
jobHash | bytes32 | is the identifier for the job this action is related to. This is used for DynamicJobs to identify separate jobs to the subgraph. |
Returns
Name | Type | Description |
---|---|---|
_0 | enum IOrchestrator.ActionState | actionState corresponding to post-execution action state. Pending if execution failed, Completed if execution succeeded. |
gasVault()
function gasVault() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
initialize(address,uint256)
function initialize(address _keeperRegistry, uint256 _rewardPerAction) external nonpayable
initialize the Orchestrator
Parameters
Name | Type | Description |
---|---|---|
_keeperRegistry | address | address of the keeper registry |
_rewardPerAction | uint256 | is # of SteerToken to give to operator nodes for each completed action (currently unused) |
keeperRegistry()
function keeperRegistry() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
_0 | address | undefined |
rewardPerAction()
function rewardPerAction() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
setGasVault(address)
function setGasVault(address _gasVault) external nonpayable
allows owner to set/update gas vault address. Mainly used to resolve mutual dependency.
Parameters
Name | Type | Description |
---|---|---|
_gasVault | address | undefined |
setRewardPerAction(uint256)
function setRewardPerAction(uint256 _rewardPerAction) external nonpayable
set the reward given to operator nodes for their participation in a strategy calculation
Parameters
Name | Type | Description |
---|---|---|
_rewardPerAction | uint256 | is amount of steer token to be earned as a reward, per participating operator node per action. |
voteBitmaps(bytes32)
function voteBitmaps(bytes32) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
_0 | bytes32 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
voteOnAction(bytes32,bool)
function voteOnAction(bytes32 actionHash, bool vote) external nonpayable
vote (if you are a keeper) on a given action proposal
Parameters
Name | Type | Description |
---|---|---|
actionHash | bytes32 | is the hash of the action to be voted on |
vote | bool | is 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
event ActionExecuted(bytes32 indexed actionHash, address from, uint256 rewardPerAction)
MUST trigger when actions are executed.
Parameters
Name | Type | Description |
---|---|---|
actionHash indexed | bytes32 | : keccak256(targetAddress, jobEpoch, calldatas) used to identify this action |
from | address | : the address of the keeper that executed this action |
rewardPerAction | uint256 | : SteerToken reward for this action, to be supplied to operator nodes. |
ActionFailed
event ActionFailed(bytes32 indexed actionHash)
Parameters
Name | Type | Description |
---|---|---|
actionHash indexed | bytes32 | undefined |
Vote
event Vote(bytes32 indexed actionHash, address indexed from, bool approved)
Parameters
Name | Type | Description |
---|---|---|
actionHash indexed | bytes32 | undefined |
from indexed | address | undefined |
approved | bool | undefined |