Orchestrator.sol
Methods
_executeAction(address,bytes[])
function _executeAction(address targetAddress, bytes[] calldatas) external nonpayable
Parameters
| Name | Type | Description |
|---|---|---|
| targetAddress | address | undefined |
| calldatas | bytes[] | undefined |
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 |
owner()
function owner() external view returns (address)
Returns the address of the current owner.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
renounceOwnership()
function renounceOwnership() external nonpayable
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()
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. |
transferOwnership(address)
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address | undefined |
upgradeTo(address)
function upgradeTo(address newImplementation) external nonpayable
Upgrade the implementation of the proxy to newImplementation. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
| Name | Type | Description |
|---|---|---|
| newImplementation | address | undefined |
upgradeToAndCall(address,bytes)
function upgradeToAndCall(address newImplementation, bytes data) external payable
Upgrade the implementation of the proxy to newImplementation, and subsequently execute the function call encoded in data. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
| Name | Type | Description |
|---|---|---|
| newImplementation | address | undefined |
| data | bytes | undefined |
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)
Parameters
| Name | Type | Description |
|---|---|---|
actionHash indexed | bytes32 | undefined |
| from | address | undefined |
| rewardPerAction | uint256 | undefined |
ActionFailed
event ActionFailed(bytes32 indexed actionHash)
Parameters
| Name | Type | Description |
|---|---|---|
actionHash indexed | bytes32 | undefined |
AdminChanged
event AdminChanged(address previousAdmin, address newAdmin)
Parameters
| Name | Type | Description |
|---|---|---|
| previousAdmin | address | undefined |
| newAdmin | address | undefined |
BeaconUpgraded
event BeaconUpgraded(address indexed beacon)
Parameters
| Name | Type | Description |
|---|---|---|
beacon indexed | address | undefined |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
| Name | Type | Description |
|---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
Upgraded
event Upgraded(address indexed implementation)
Parameters
| Name | Type | Description |
|---|---|---|
implementation indexed | address | 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 |