Closed hackfisher closed 2 years ago
Moving functions to SDK can help simplify the code, especially for multi instance pallets, and make runtime smaller.
https://github.com/darwinia-network/darwinia-common/pull/1171
decl_runtime_apis! { pub trait BalancesApi<AccountId, Balance> where AccountId: Codec, Balance: Debug + Codec + MaybeDisplay + MaybeFromStr, { fn usable_balance(instance: u8, who: AccountId) -> RuntimeDispatchInfo<Balance>; } }
decl_runtime_apis! { pub trait FeeMarketApi<Balance> where Balance: Codec + MaybeDisplay + MaybeFromStr, { fn market_fee(instance: u8) -> Option<Fee<Balance>>; fn in_process_orders(instance: u8) -> InProcessOrders; } }
related: https://github.com/darwinia-network/wormhole-ui/issues/142
closed by #72 #71
Moving functions to SDK can help simplify the code, especially for multi instance pallets, and make runtime smaller.
https://github.com/darwinia-network/darwinia-common/pull/1171