axelar-gmp-sdk-solidity

Solidity API

IInterchainGovernance

This interface extends IAxelarExecutable for interchain governance mechanisms.

NotGovernance

error NotGovernance()

NotSelf

error NotSelf()

InvalidCommand

error InvalidCommand()

InvalidTarget

error InvalidTarget()

TokenNotSupported

error TokenNotSupported()

ProposalScheduled

event ProposalScheduled(bytes32 proposalHash, address target, bytes callData, uint256 value, uint256 eta)

ProposalCancelled

event ProposalCancelled(bytes32 proposalHash, address target, bytes callData, uint256 value, uint256 eta)

ProposalExecuted

event ProposalExecuted(bytes32 proposalHash, address target, bytes callData, uint256 value, uint256 timestamp)

governanceChain

function governanceChain() external view returns (string)

Returns the name of the governance chain.

Return Values

Name Type Description
[0] string string The name of the governance chain

governanceAddress

function governanceAddress() external view returns (string)

Returns the address of the governance address.

Return Values

Name Type Description
[0] string string The address of the governance address

governanceChainHash

function governanceChainHash() external view returns (bytes32)

Returns the hash of the governance chain.

Return Values

Name Type Description
[0] bytes32 bytes32 The hash of the governance chain

governanceAddressHash

function governanceAddressHash() external view returns (bytes32)

Returns the hash of the governance address.

Return Values

Name Type Description
[0] bytes32 bytes32 The hash of the governance address

getProposalEta

function getProposalEta(address target, bytes callData, uint256 nativeValue) external view returns (uint256)

Returns the ETA of a proposal.

Parameters

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

Return Values

Name Type Description
[0] uint256 uint256 The ETA of the proposal

executeProposal

function executeProposal(address targetContract, bytes callData, uint256 value) external payable

Executes a governance proposal.

Parameters

Name Type Description
targetContract address The address of the contract targeted by the proposal
callData bytes The call data to be sent to the target contract
value uint256 The amount of ETH to be sent to the target contract

withdraw

function withdraw(address recipient, uint256 amount) external

Withdraws native token from the contract

This function is only callable by the contract itself after passing according proposal

Parameters

Name Type Description
recipient address The address to send the native token to
amount uint256 The amount of native token to send