axelar-gmp-sdk-solidity

Solidity API

IOperators

Interface for an access control mechanism where operators have exclusive permissions to execute functions.

NotOperator

error NotOperator()

InvalidOperator

error InvalidOperator()

OperatorAlreadyAdded

error OperatorAlreadyAdded()

NotAnOperator

error NotAnOperator()

ExecutionFailed

error ExecutionFailed()

OperatorAdded

event OperatorAdded(address operator)

OperatorRemoved

event OperatorRemoved(address operator)

isOperator

function isOperator(address account) external view returns (bool)

Check if an account is an operator.

Parameters

Name Type Description
account address Address of the account to check

Return Values

Name Type Description
[0] bool bool True if the account is an operator, false otherwise

addOperator

function addOperator(address operator) external

Adds an operator.

Parameters

Name Type Description
operator address The address to add as an operator

removeOperator

function removeOperator(address operator) external

Removes an operator.

Parameters

Name Type Description
operator address The address of the operator to remove

executeContract

function executeContract(address target, bytes callData, uint256 nativeValue) external payable returns (bytes)

Executes an external contract call.

Execution logic is left up to the implementation.

Parameters

Name Type Description
target address The contract to call
callData bytes The data to call the target contract with
nativeValue uint256 The amount of native asset to send with the call

Return Values

Name Type Description
[0] bytes bytes The data returned from the contract call