Skip to main content

Orchestrator.sol

Methods​

_executeAction(address,bytes[])​

Solidity

function _executeAction(address targetAddress, bytes[] calldatas) external nonpayable

Parameters​

NameTypeDescription
targetAddressaddressundefined
calldatasbytes[]undefined

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

owner()​

Solidity

function owner() external view returns (address)
Details

Returns the address of the current owner.

Returns​

NameTypeDescription
_0addressundefined

renounceOwnership()​

Solidity

function renounceOwnership() external nonpayable
Details

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

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.

transferOwnership(address)​

Solidity

function transferOwnership(address newOwner) external nonpayable
Details

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters​

NameTypeDescription
newOwneraddressundefined

upgradeTo(address)​

Solidity

function upgradeTo(address newImplementation) external nonpayable
Details

Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters​

NameTypeDescription
newImplementationaddressundefined

upgradeToAndCall(address,bytes)​

Solidity

function upgradeToAndCall(address newImplementation, bytes data) external payable
Details

Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.

Parameters​

NameTypeDescription
newImplementationaddressundefined
databytesundefined

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)

Parameters​

NameTypeDescription
actionHash indexedbytes32undefined
fromaddressundefined
rewardPerActionuint256undefined

ActionFailed​

Solidity

event ActionFailed(bytes32 indexed actionHash)

Parameters​

NameTypeDescription
actionHash indexedbytes32undefined

AdminChanged​

Solidity

event AdminChanged(address previousAdmin, address newAdmin)

Parameters​

NameTypeDescription
previousAdminaddressundefined
newAdminaddressundefined

BeaconUpgraded​

Solidity

event BeaconUpgraded(address indexed beacon)

Parameters​

NameTypeDescription
beacon indexedaddressundefined

OwnershipTransferred​

Solidity

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters​

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

Upgraded​

Solidity

event Upgraded(address indexed implementation)

Parameters​

NameTypeDescription
implementation indexedaddressundefined

Vote​

Solidity

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

Parameters​

NameTypeDescription
actionHash indexedbytes32undefined
from indexedaddressundefined
approvedboolundefined