This interface extends IAxelarExecutable for interchain governance mechanisms.
error NotGovernance()
error NotSelf()
error InvalidCommand()
error InvalidTarget()
error TokenNotSupported()
event ProposalScheduled(bytes32 proposalHash, address target, bytes callData, uint256 value, uint256 eta)
event ProposalCancelled(bytes32 proposalHash, address target, bytes callData, uint256 value, uint256 eta)
event ProposalExecuted(bytes32 proposalHash, address target, bytes callData, uint256 value, uint256 timestamp)
function governanceChain() external view returns (string)
Returns the name of the governance chain.
Name | Type | Description |
---|---|---|
[0] | string | string The name of the governance chain |
function governanceAddress() external view returns (string)
Returns the address of the governance address.
Name | Type | Description |
---|---|---|
[0] | string | string The address of the governance address |
function governanceChainHash() external view returns (bytes32)
Returns the hash of the governance chain.
Name | Type | Description |
---|---|---|
[0] | bytes32 | bytes32 The hash of the governance chain |
function governanceAddressHash() external view returns (bytes32)
Returns the hash of the governance address.
Name | Type | Description |
---|---|---|
[0] | bytes32 | bytes32 The hash of the governance address |
function getProposalEta(address target, bytes callData, uint256 nativeValue) external view returns (uint256)
Returns the ETA of a proposal.
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] | uint256 | uint256 The ETA of the proposal |
function executeProposal(address targetContract, bytes callData, uint256 value) external payable
Executes a governance proposal.
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 |
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
Name | Type | Description |
---|---|---|
recipient | address | The address to send the native token to |
amount | uint256 | The amount of native token to send |