IReactorGateway Interface
Overview
The IReactorGateway interface defines a set of functions designed for managing cross-chain communication, fee handling, and contract state (pause/unpause). It enables sending messages, executing actions from other sources, retrying failed messages, and configuring fee management.
Interface
interface IReactorGateway {
function execute(bytes32 _id, address _destinationAddress, string calldata _sourceName, string calldata _sourceAddress, string calldata _action, bytes calldata _payload) external;
function feeManager() external returns (address);
function pause() external;
function retry(bytes32 _id, address _destinationAddress, string calldata _sourceName, string calldata _sourceAddress, string calldata _action, bytes calldata _payload) external;
function send(address _paymentToken, string calldata _destinationName, string calldata _destinationAddress, string calldata _action, bytes calldata _payload, bool _waitForFinality) external payable;
function setFeeHolder(address _feeHolder) external;
function setFeeManager(address _feeManager) external;
function unpause() external;
}Function Details
execute
function execute(
bytes32 _id,
address _destinationAddress,
string calldata _sourceName,
string calldata _sourceAddress,
string calldata _action,
bytes calldata _payload
) external;Executes an action received from another chain.
_id: Unique identifier for the message._destinationAddress: Contract address to execute the payload._sourceName: Name of the originating blockchain._sourceAddress: Address of the caller on the source._action: Action to be performed._payload: Encoded data required to perform the action.
feeManager
function feeManager() external returns (address);Returns the current address of the fee manager responsible for fee logic.
pause
function pause() external;Pauses contract operations. Typically used during upgrades or incident response.
retry
function retry(
bytes32 _id,
address _destinationAddress,
string calldata _sourceName,
string calldata _sourceAddress,
string calldata _action,
bytes calldata _payload
) external;Retries a previously failed message delivery or execution.
- Same parameters as
execute.
send
function send(
address _paymentToken,
string calldata _destinationName,
string calldata _destinationAddress,
string calldata _action,
bytes calldata _payload,
bool _waitForFinality
) external payable;Sends a message or initiates an action on a destination.
_paymentToken: Token used to pay for cross-chain messaging._destinationName: Target blockchain name._destinationAddress: Address to invoke on the destination._action: Action name to be invoked._payload: Encoded action-specific data._waitForFinality: Whether to wait for finality before proceeding.
setFeeHolder
function setFeeHolder(address _feeHolder) external;Sets the address to receive collected fees.
setFeeManager
function setFeeManager(address _feeManager) external;Updates the address responsible for fee logic.
unpause
function unpause() external;Resumes normal contract operations after a pause.
Last updated on