This interface extends IInterchainGovernance for operator proposal actions
error InvalidOperator()
error NotApproved()
error NotAuthorized()
event OperatorProposalApproved(bytes32 proposalHash, address targetContract, bytes callData, uint256 nativeValue)
event OperatorProposalCancelled(bytes32 proposalHash, address targetContract, bytes callData, uint256 nativeValue)
event OperatorProposalExecuted(bytes32 proposalHash, address targetContract, bytes callData, uint256 nativeValue)
event OperatorshipTransferred(address oldOperator, address newOperator)
function operatorApprovals(bytes32 proposalHash) external view returns (bool)
Returns whether an operator proposal has been approved
Name | Type | Description |
---|---|---|
proposalHash | bytes32 | The hash of the proposal |
Name | Type | Description |
---|---|---|
[0] | bool | bool True if the proposal has been approved, False otherwise |
function isOperatorProposalApproved(address target, bytes callData, uint256 nativeValue) external view returns (bool)
Returns whether an operator proposal has been approved
Name | Type | Description |
---|---|---|
target | address | The address of the contract targeted by the proposal |
callData | bytes | The call data to be sent to the target contract |
nativeValue | uint256 | The amount of native tokens to be sent to the target contract |
Name | Type | Description |
---|---|---|
[0] | bool | bool True if the proposal has been approved, False otherwise |
function executeOperatorProposal(address targetContract, bytes callData, uint256 value) external payable
Executes an operator proposal
Name | Type | Description |
---|---|---|
targetContract | address | The target address the proposal will call |
callData | bytes | The data that encodes the function and arguments to call on the target contract |
value | uint256 |
function transferOperatorship(address newOperator) external
Transfers the operator address to a new address
Only the current operator or the governance can call this function
Name | Type | Description |
---|---|---|
newOperator | address | The new operator address |