IBridge Interface

The bridge interface IBridge consists primarily of one function relayAndVerify to be called when a smart contract takes data from BandChain and want to verify its integrity.

interface IBridge {
/// Helper struct to help the function caller to decode oracle data.
struct VerifyOracleDataResult {
bytes data;
bytes32 codeHash;
bytes params;
}
‚Äč
/// Performs oracle state relay and oracle data verification in one go. The caller submits
/// the encoded proof and receives back the decoded data, ready to be validated and used.
/// @param _data The encoded data for oracle state relay and data verification.
function relayAndVerify(bytes calldata _data)
external
returns (VerifyOracleDataResult memory result);
}