#![cfg_attr(not(feature = "std"), no_std)]
use codec::Codec;
use sp_runtime::sp_std;
use sp_std::prelude::*;
use t3rn_primitives::xdns::{FullGatewayRecord, GatewayRecord};
pub use t3rn_primitives::{gateway::GatewayABIConfig, ChainId};
sp_api::decl_runtime_apis! {
pub trait XdnsRuntimeApi<AccountId> where
AccountId: Codec,
{
fn fetch_records() -> Vec<GatewayRecord<AccountId>>;
fn fetch_full_gateway_records() -> Vec<FullGatewayRecord<AccountId>>;
fn fetch_abi(chain_id: ChainId) -> Option<GatewayABIConfig>;
fn retreive_treasury_address(treasury_account: t3rn_primitives::TreasuryAccount) -> AccountId;
}
}