Trait pallet_circuit::Xdns

pub trait Xdns<T, Balance>where
    T: Config,{
Show 31 methods // Required methods fn fetch_gateways() -> Vec<GatewayRecord<<T as Config>::AccountId>, Global>; fn get_slowest_verifier_target( all_targets: Vec<[u8; 4], Global>, speed_mode: &SpeedMode, emergency_offset: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number ) -> Option<(GatewayVendor, [u8; 4], <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number)>; fn estimate_adaptive_timeout_on_slowest_target( target_ids: Vec<[u8; 4], Global>, speed_mode: &SpeedMode, emergency_offset: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number ) -> AdaptiveTimeout<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, [u8; 4]>; fn register_new_token( origin: &<T as Config>::RuntimeOrigin, token_id: u32, token_props: TokenInfo ) -> Result<(), DispatchError>; fn link_token_to_gateway( token_id: u32, gateway_id: [u8; 4], token_props: TokenInfo ) -> Result<(), DispatchError>; fn override_token( token_id: u32, gateway_id: [u8; 4], token_props: TokenInfo ) -> Result<(), DispatchError>; fn list_available_mint_assets( gateway_id: [u8; 4] ) -> Vec<TokenRecord, Global>; fn check_asset_is_mintable(gateway_id: [u8; 4], asset_id: u32) -> bool; fn mint( asset_id: u32, user: <T as Config>::AccountId, amount: Balance ) -> Result<(), DispatchError>; fn burn( asset_id: u32, user: <T as Config>::AccountId, amount: Balance ) -> Result<(), DispatchError>; fn is_target_active(gateway_id: [u8; 4], security_lvl: &SecurityLvl) -> bool; fn get_remote_order_contract_address( gateway_id: [u8; 4] ) -> Result<H256, DispatchError>; fn get_remote_bidding_contract_address( gateway_id: [u8; 4] ) -> Result<H256, DispatchError>; fn get_token_by_eth_address( gateway_id: [u8; 4], eth_address: H160 ) -> Result<TokenRecord, DispatchError>; fn get_self_token_id() -> u32; fn add_new_gateway( gateway_id: [u8; 4], verification_vendor: GatewayVendor, execution_vendor: ExecutionVendor, codec: Codec, registrant: Option<<T as Config>::AccountId>, escrow_account: Option<<T as Config>::AccountId>, allowed_side_effects: Vec<([u8; 4], Option<u8>), Global> ) -> Result<(), DispatchError>; fn override_gateway( gateway_id: [u8; 4], verification_vendor: GatewayVendor, execution_vendor: ExecutionVendor, codec: Codec, registrant: Option<<T as Config>::AccountId>, escrow_account: Option<<T as Config>::AccountId>, allowed_side_effects: Vec<([u8; 4], Option<u8>), Global> ) -> Result<(), DispatchError>; fn extend_sfx_abi( origin: <T as Config>::RuntimeOrigin, gateway_id: [u8; 4], sfx_4b_id: [u8; 4], sfx_expected_abi: SFXAbi ) -> Result<(), DispatchError>; fn override_sfx_abi( gateway_id: [u8; 4], new_sfx_abi: Vec<([u8; 4], SFXAbi), Global> ) -> Result<(), DispatchError>; fn get_all_sfx_abi(gateway_id: &[u8; 4]) -> Vec<([u8; 4], SFXAbi), Global>; fn get_sfx_abi(gateway_id: &[u8; 4], sfx_4b_id: [u8; 4]) -> Option<SFXAbi>; fn add_escrow_account( origin: <T as Config>::RuntimeOrigin, gateway_id: [u8; 4], escrow_account: <T as Config>::AccountId ) -> Result<(), DispatchError>; fn allowed_side_effects( gateway_id: &[u8; 4] ) -> Vec<([u8; 4], Option<u8>), Global>; fn get_gateway_max_security_lvl(chain_id: &[u8; 4]) -> SecurityLvl; fn get_verification_vendor( chain_id: &[u8; 4] ) -> Result<GatewayVendor, DispatchError>; fn get_target_codec(chain_id: &[u8; 4]) -> Result<Codec, DispatchError>; fn get_escrow_account( chain_id: &[u8; 4] ) -> Result<Vec<u8, Global>, DispatchError>; fn fetch_full_gateway_records( ) -> Vec<FullGatewayRecord<<T as Config>::AccountId>, Global>; fn read_last_activity_overview( ) -> Vec<GatewayActivity<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, Global>; fn read_last_activity( gateway_id: [u8; 4] ) -> Option<GatewayActivity<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>>; fn verify_active( gateway_id: &[u8; 4], max_acceptable_heartbeat_offset: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, security_lvl: &SecurityLvl ) -> Result<LightClientHeartbeat<T>, DispatchError>;
}

Required Methods§

fn fetch_gateways() -> Vec<GatewayRecord<<T as Config>::AccountId>, Global>

fn get_slowest_verifier_target( all_targets: Vec<[u8; 4], Global>, speed_mode: &SpeedMode, emergency_offset: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number ) -> Option<(GatewayVendor, [u8; 4], <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number)>

fn estimate_adaptive_timeout_on_slowest_target( target_ids: Vec<[u8; 4], Global>, speed_mode: &SpeedMode, emergency_offset: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number ) -> AdaptiveTimeout<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, [u8; 4]>

fn register_new_token( origin: &<T as Config>::RuntimeOrigin, token_id: u32, token_props: TokenInfo ) -> Result<(), DispatchError>

fn override_token( token_id: u32, gateway_id: [u8; 4], token_props: TokenInfo ) -> Result<(), DispatchError>

fn list_available_mint_assets(gateway_id: [u8; 4]) -> Vec<TokenRecord, Global>

fn check_asset_is_mintable(gateway_id: [u8; 4], asset_id: u32) -> bool

fn mint( asset_id: u32, user: <T as Config>::AccountId, amount: Balance ) -> Result<(), DispatchError>

fn burn( asset_id: u32, user: <T as Config>::AccountId, amount: Balance ) -> Result<(), DispatchError>

fn is_target_active(gateway_id: [u8; 4], security_lvl: &SecurityLvl) -> bool

fn get_remote_order_contract_address( gateway_id: [u8; 4] ) -> Result<H256, DispatchError>

fn get_remote_bidding_contract_address( gateway_id: [u8; 4] ) -> Result<H256, DispatchError>

fn get_token_by_eth_address( gateway_id: [u8; 4], eth_address: H160 ) -> Result<TokenRecord, DispatchError>

fn get_self_token_id() -> u32

fn add_new_gateway( gateway_id: [u8; 4], verification_vendor: GatewayVendor, execution_vendor: ExecutionVendor, codec: Codec, registrant: Option<<T as Config>::AccountId>, escrow_account: Option<<T as Config>::AccountId>, allowed_side_effects: Vec<([u8; 4], Option<u8>), Global> ) -> Result<(), DispatchError>

fn override_gateway( gateway_id: [u8; 4], verification_vendor: GatewayVendor, execution_vendor: ExecutionVendor, codec: Codec, registrant: Option<<T as Config>::AccountId>, escrow_account: Option<<T as Config>::AccountId>, allowed_side_effects: Vec<([u8; 4], Option<u8>), Global> ) -> Result<(), DispatchError>

fn extend_sfx_abi( origin: <T as Config>::RuntimeOrigin, gateway_id: [u8; 4], sfx_4b_id: [u8; 4], sfx_expected_abi: SFXAbi ) -> Result<(), DispatchError>

fn override_sfx_abi( gateway_id: [u8; 4], new_sfx_abi: Vec<([u8; 4], SFXAbi), Global> ) -> Result<(), DispatchError>

fn get_all_sfx_abi(gateway_id: &[u8; 4]) -> Vec<([u8; 4], SFXAbi), Global>

fn get_sfx_abi(gateway_id: &[u8; 4], sfx_4b_id: [u8; 4]) -> Option<SFXAbi>

fn add_escrow_account( origin: <T as Config>::RuntimeOrigin, gateway_id: [u8; 4], escrow_account: <T as Config>::AccountId ) -> Result<(), DispatchError>

fn allowed_side_effects( gateway_id: &[u8; 4] ) -> Vec<([u8; 4], Option<u8>), Global>

fn get_gateway_max_security_lvl(chain_id: &[u8; 4]) -> SecurityLvl

fn get_verification_vendor( chain_id: &[u8; 4] ) -> Result<GatewayVendor, DispatchError>

fn get_target_codec(chain_id: &[u8; 4]) -> Result<Codec, DispatchError>

fn get_escrow_account( chain_id: &[u8; 4] ) -> Result<Vec<u8, Global>, DispatchError>

fn fetch_full_gateway_records( ) -> Vec<FullGatewayRecord<<T as Config>::AccountId>, Global>

fn read_last_activity_overview( ) -> Vec<GatewayActivity<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>, Global>

fn read_last_activity( gateway_id: [u8; 4] ) -> Option<GatewayActivity<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number>>

fn verify_active( gateway_id: &[u8; 4], max_acceptable_heartbeat_offset: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, security_lvl: &SecurityLvl ) -> Result<LightClientHeartbeat<T>, DispatchError>

Implementors§