-
Notifications
You must be signed in to change notification settings - Fork 248
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
Handle type clash #271
Comments
I'm faced with the same problem. |
Yes indeed, I'm back next week from holiday to work again on that and that should solve most custom type problems |
Closed by #294 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://polkadot.js.org/docs/api/start/types.extend#type-clashes
As mentioned in the above link from polkadotjs-api, there could be type clashes, and a well known example is
Balances::Balance = u128
andAssets::Balance = u64
. In the current impl, subxt only handlesBalance = u128
, and will use this definition to decodeAssets::Balance
, causing a failure to decode the Assets events.A simple approach like it in polkadotjs: in the type registry, let's add the pallet name for specific type look up. Usually the type definition don't require change, but for the type clashes, we can register a full type name
{pallet}::{type}
in the registry.For example, we call:
And in
events.rs
, whenever it looks up a type, try{pallet}::{type}
before{type}
.The text was updated successfully, but these errors were encountered: