-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
make ParentchainApi generic to support Asset Hub #1650
base: master
Are you sure you want to change the base?
Conversation
pub trait ParentchainApiTrait: | ||
AccountApi<AccountId = AccountId, Balance = Balance, Index = Index> | ||
+ GetBalance<Balance = Balance> | ||
+ GetStorage | ||
+ SystemApi<Properties = Properties> | ||
+ BalancesExtrinsics<Address = MultiAddress<AccountId, Index>, Balance = Balance> | ||
+ ChainApi | ||
+ GetAccountInformation<Index = Index> | ||
+ SubscribeEvents | ||
+ GetTransactionPayment<Balance = Balance> | ||
+ SubmitAndWatch<Hash = Hash> //+ GetRuntimeVersionAt<Block<Header, UncheckedExtrinsic<A>>> | ||
{ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this supertrait shall simplify using generic NodeApis, defined per Parentchain in app-libs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a bit unsure about this trait. Even if we have it, I would only make it a trait bound in as few places as possible, as 99% of the times we only need part of it.
|
||
pub type IntegriteeApi = Api<IntegriteeRuntimeConfig, TungsteniteRpcClient>; | ||
|
||
impl ParentchainApiTrait for IntegriteeApi {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super traits are usually generically implemented for T
satisfying all the constraints, i.e.,
impl<T> ParentchainApiTrait for T
where T: ....
{}
This is WIP. just wanted to know how far away we are. And we're not exactly near. reachable, but with effort
challenges: