pub trait Portal<T: Config> {
Show 23 methods
// Required methods
fn get_latest_heartbeat(
gateway_id: &ChainId
) -> Result<LightClientHeartbeat<T>, DispatchError>;
fn get_latest_heartbeat_by_vendor(
vendor: GatewayVendor
) -> LightClientHeartbeat<T>;
fn get_latest_finalized_header(
gateway_id: ChainId
) -> Result<HeaderResult, DispatchError>;
fn get_finalized_height(
gateway_id: ChainId
) -> Result<HeightResult<BlockNumberFor<T>>, DispatchError>;
fn get_rational_height(
gateway_id: ChainId
) -> Result<HeightResult<BlockNumberFor<T>>, DispatchError>;
fn get_fast_height(
gateway_id: ChainId
) -> Result<HeightResult<BlockNumberFor<T>>, DispatchError>;
fn get_latest_finalized_header_precompile(gateway_id: ChainId) -> Bytes;
fn get_finalized_height_precompile(gateway_id: ChainId) -> BlockNumberFor<T>;
fn get_rational_height_precompile(gateway_id: ChainId) -> BlockNumberFor<T>;
fn get_fast_height_precompile(gateway_id: ChainId) -> BlockNumberFor<T>;
fn verify_event_inclusion(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
source: Option<ExecutionSource>,
message: Bytes
) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>;
fn verify_state_inclusion(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Bytes
) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>;
fn verify_tx_inclusion(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Bytes
) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>;
fn verify_event_inclusion_precompile(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
source: ExecutionSource,
message: Bytes
) -> Result<Bytes, DispatchError>;
fn verify_state_inclusion_precompile(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Bytes
) -> Result<Bytes, DispatchError>;
fn verify_tx_inclusion_precompile(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Bytes
) -> Result<Bytes, DispatchError>;
fn verify_state_inclusion_and_recode(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Bytes,
abi_descriptor: Bytes,
out_codec: Codec
) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>;
fn verify_tx_inclusion_and_recode(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
message: Bytes,
abi_descriptor: Bytes,
out_codec: Codec
) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>;
fn verify_event_inclusion_and_recode(
gateway_id: [u8; 4],
speed_mode: SpeedMode,
source: ExecutionSource,
message: Bytes,
abi_descriptor: Bytes,
out_codec: Codec
) -> Result<InclusionReceipt<BlockNumberFor<T>>, DispatchError>;
fn initialize(
origin: T::RuntimeOrigin,
gateway_id: [u8; 4],
encoded_registration_data: Bytes
) -> Result<(), DispatchError>;
fn submit_encoded_headers(
gateway_id: ChainId,
encoded_header_data: Vec<u8>
) -> Result<(), DispatchError>;
fn turn_on(
origin: T::RuntimeOrigin,
gateway_id: [u8; 4]
) -> Result<bool, DispatchError>;
fn turn_off(
origin: T::RuntimeOrigin,
gateway_id: [u8; 4]
) -> Result<bool, DispatchError>;
}