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