Orchestrator.sol
Methods
_executeAction(bytes,bytes)
function _executeAction(bytes data, bytes dynamicData) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
data | bytes | undefined |
dynamicData | bytes | undefined |
actionApprovalByUser(uint256,address)
function actionApprovalByUser(uint256 actionId, address _member) external view returns (uint8)
Returns true if an action with given actionId
is approved by _member
of the group.
Parameters
Name | Type | Description |
---|---|---|
actionId | uint256 | undefined |
_member | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint8 | undefined |
actionApprovalStatus(uint256)
function actionApprovalStatus(uint256 actionId) external view returns (uint8)
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 |
---|---|---|
actionId | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint8 | undefined |
actionCount()
function actionCount() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
actionThresholdPercent()
function actionThresholdPercent() external view returns (uint16)
Returns
Name | Type | Description |
---|---|---|
_0 | uint16 | undefined |
action_approvals(uint256,address)
function action_approvals(uint256, address) external view returns (uint8)
Parameters
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
_1 | address | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint8 | undefined |
actions(uint256)
function actions(uint256) external view returns (address targetAddress, bytes32 hash, enum IOrchestrator.actionState state)
Parameters
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
targetAddress | address | undefined |
hash | bytes32 | undefined |
state | enum IOrchestrator.actionState | undefined |
approveAction(uint256,uint8)
function approveAction(uint256 actionId, uint8 _vote) external nonpayable returns (bool)
Allows an existing _member
of the group to approve/reject an already created action/proposal given by actionId
which is open for approval for all members of the group. Emits a {vote} event.
Parameters
Name | Type | Description |
---|---|---|
actionId | uint256 | undefined |
_vote | uint8 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
createAction(bytes4[],bytes[],address,bytes32,address[])
function createAction(bytes4[] methods, bytes[] args, address targetAddress, bytes32 _hash, address[] _recipients) external nonpayable returns (uint256)
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.
Parameters
Name | Type | Description |
---|---|---|
methods | bytes4[] | undefined |
args | bytes[] | undefined |
targetAddress | address | undefined |
_hash | bytes32 | undefined |
_recipients | address[] | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | uint256 | the actionId of the created action. Emits an {ActionStateChanged} event. |
executeAction(uint256,bytes[])
function executeAction(uint256 actionId, bytes[] dynamicData) 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. Emits an {ActionStateChanged} event.
Parameters
Name | Type | Description |
---|---|---|
actionId | uint256 | undefined |
dynamicData | bytes[] | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | enum IOrchestrator.actionState | undefined |
getActionInfo(uint256)
function getActionInfo(uint256 actionId) external view returns (bytes4[] methods, bytes[] args, address targetAddress, enum IOrchestrator.actionState state)
Returns the details of an already created action/proposal given by actionId
which is open for approval for all members of the group.
Parameters
Name | Type | Description |
---|---|---|
actionId | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
methods | bytes4[] | undefined |
args | bytes[] | undefined |
targetAddress | address | undefined |
state | enum IOrchestrator.actionState | undefined |
initialize(address,uint256)
function initialize(address _keeperRegistry, uint256 _rewardPerAction) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
_keeperRegistry | address | undefined |
_rewardPerAction | uint256 | 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
Parameters
Name | Type | Description |
---|---|---|
_gasVault | address | undefined |
setRewardPerRequest(uint256)
function setRewardPerRequest(uint256 _rewardPerAction) external nonpayable
Parameters
Name | Type | Description |
---|---|---|
_rewardPerAction | uint256 | undefined |
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 |
Events
ActionCreated
event ActionCreated(uint256 _actionId, address _from, enum IOrchestrator.actionState _state, bytes32 _hash, address[] _recipients)
Parameters
Name | Type | Description |
---|---|---|
_actionId | uint256 | undefined |
_from | address | undefined |
_state | enum IOrchestrator.actionState | undefined |
_hash | bytes32 | undefined |
_recipients | address[] | undefined |
ActionExecuted
event ActionExecuted(uint256 _actionId, address _from, uint256 _rewardPerRequest)
Parameters
Name | Type | Description |
---|---|---|
_actionId | uint256 | undefined |
_from | address | undefined |
_rewardPerRequest | uint256 | undefined |
ActionRejected
event ActionRejected(uint256 _actionId, address _from)
Parameters
Name | Type | Description |
---|---|---|
_actionId | uint256 | undefined |
_from | address | 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 |
actionFailed
event actionFailed(uint256 _actionId)
Parameters
Name | Type | Description |
---|---|---|
_actionId | uint256 | undefined |
vote
event vote(uint256 _actionId, address _from, uint8 _approved)
Parameters
Name | Type | Description |
---|---|---|
_actionId | uint256 | undefined |
_from | address | undefined |
_approved | uint8 | undefined |