Skip to content
Lattice

IIsmpDispatcher

Git Source

The ISMP dispatcher (implemented by the local IsmpHost).

Functions

feeToken

The address of the ERC-20 fee token configured for this state machine. Hyperbridge collects its dispatch fees in this denomination (typically a stablecoin). The host can migrate it — integrators must read it LIVE, never cache it.

function feeToken() external view returns (address);

Returns

NameTypeDescription
<none>address

perByteFee

The per-byte protocol fee configured for the destination state machine dest, charged in feeToken for every byte of the outgoing request body.

function perByteFee(bytes memory dest) external view returns (uint256);

Parameters

NameTypeDescription
destbytes

Returns

NameTypeDescription
<none>uint256

dispatch

Dispatches a POST request to Hyperbridge, charging perByteFee(dest) * body.length + request.fee in feeToken to msg.sender (when no native value is supplied).

function dispatch(DispatchPost memory request) external payable returns (bytes32 commitment);

Parameters

NameTypeDescription
requestDispatchPost

Returns

NameTypeDescription
commitmentbytes32The request commitment (the host-side unique id of the request).