Skip to content
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

Update api-client to tag v0.12 #328

Merged
merged 3 commits into from
Jun 14, 2023
Merged

Update api-client to tag v0.12 #328

merged 3 commits into from
Jun 14, 2023

Conversation

haerdib
Copy link
Contributor

@haerdib haerdib commented Jun 14, 2023

closes #319

@haerdib haerdib self-assigned this Jun 14, 2023
@haerdib haerdib mentioned this pull request Jun 14, 2023
1 task
Copy link
Member

@clangenb clangenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, sorry I was curious, and I already had to take a look at it. :) Looks like a nice improvement in general. :)

client/src/main.rs Show resolved Hide resolved
@haerdib
Copy link
Contributor Author

haerdib commented Jun 14, 2023

If an extrinsic fails the following is now printed:

[2023-06-14T09:36:06Z ERROR encointer_client_notee] ExtrinsicFailed: Event::ExtrinsicFailed { dispatch_error: Module(ModuleError { index: 61, error: [16, 0, 0, 0], message: None }), dispatch_info: DispatchInfo { weight: Weight { ref_time: 4782638000, proof_size: 0 }, class: DispatchClass::Normal, pays_fee: Pays::Yes } }

Previously:

[2023-06-14T09:25:24Z ERROR encointer_client_notee] ExtrinsicFailed: EventDetails { phase: ApplyExtrinsic(1), index: 0, all_bytes: [4, 0, 1, 0, 0, 0, 0, 1, 3, 61, 16, 0, 0, 0, 7, 176, 67, 17, 29, 1, 0, 0, 0, 0], start_idx: 1, fields_start_idx: 8, fields_end_idx: 23, end_idx: 24, metadata: Metadata { metadata: RuntimeMetadataV14 { types: PortableRegistry { types: [PortableType { id: 0, ty: Type { path: Path { segments: ["sp_core", "crypto", "AccountId32"] }, type_params: [], type_def: Composite(TypeDefComposite { fields: [Field { name: None, ty: UntrackedSymbol { id: 1, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("[u8; 32]"), docs: [] }] }), docs: [] } }, PortableType { id: 1, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Array(TypeDefArray { len: 32, type_param: UntrackedSymbol { id: 2, marker: PhantomData<fn() -> core::any::TypeId> } }), docs: [] } }, PortableType { id: 2, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Primitive(U8), docs: [] } }, PortableType { id: 3, ty: Type { path: Path { segments: ["frame_system", "AccountInfo"] }, type_params: [TypeParameter { name: "Index", ty: Some(UntrackedSymbol { id: 4, marker: PhantomData<fn() -> core::any::TypeId> }) }, TypeParameter { name: "AccountData", ty: Some(UntrackedSymbol { id: 5, marker: PhantomData<fn() -> core::any::TypeId> }) }], type_def: Composite(TypeDefComposite { fields: [Field { name: Some("nonce"), ty: UntrackedSymbol { id: 4, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Index"), docs: [] }, Field { name: Some("consumers"), ty: UntrackedSymbol { id: 4, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("RefCount"), docs: [] }, Field { name: Some("providers"), ty: UntrackedSymbol { id: 4, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("RefCount"), docs: [] }, Field { name: Some("sufficients"), ty: UntrackedSymbol { id: 4, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("RefCount"), docs: [] }, Field { name: Some("data"), ty: UntrackedSymbol { id: 5, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("AccountData"), docs: [] }] }), docs: [] } }, PortableType { id: 4, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Primitive(U32), docs: [] } }, PortableType { id: 5, ty: Type { path: Path { segments: ["pallet_balances", "types", "AccountData"] }, type_params: [TypeParameter { name: "Balance", ty: Some(UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }) }], type_def: Composite(TypeDefComposite { fields: [Field { name: Some("free"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Balance"), docs: [] }, Field { name: Some("reserved"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Balance"), docs: [] }, Field { name: Some("frozen"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Balance"), docs: [] }, Field { name: Some("flags"), ty: UntrackedSymbol { id: 7, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("ExtraFlags"), docs: [] }] }), docs: [] } }, PortableType { id: 6, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Primitive(U128), docs: [] } }, PortableType { id: 7, ty: Type { path: Path { segments: ["pallet_balances", "types", "ExtraFlags"] }, type_params: [], type_def: Composite(TypeDefComposite { fields: [Field { name: None, ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("u128"), docs: [] }] }), docs: [] } }, PortableType { id: 8, ty: Type { path: Path { segments: ["frame_support", "dispatch", "PerDispatchClass"] }, type_params: [TypeParameter { name: "T", ty: Some(UntrackedSymbol { id: 9, marker: PhantomData<fn() -> core::any::TypeId> }) }], type_def: Composite(TypeDefComposite { fields: [Field { name: Some("normal"), ty: UntrackedSymbol { id: 9, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T"), docs: [] }, Field { name: Some("operational"), ty: UntrackedSymbol { id: 9, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T"), docs: [] }, Field { name: Some("mandatory"), ty: UntrackedSymbol { id: 9, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T"), docs: [] }] }), docs: [] } }, PortableType { id: 9, ty: Type { path: Path { segments: ["sp_weights", "weight_v2", "Weight"] }, type_params: [], type_def: Composite(TypeDefComposite { fields: [Field { name: Some("ref_time"), ty: UntrackedSymbol { id: 10, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("u64"), docs: [] }, Field { name: Some("proof_size"), ty: UntrackedSymbol { id: 10, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("u64"), docs: [] }] }), docs: [] } }, PortableType { id: 10, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Compact(TypeDefCompact { type_param: UntrackedSymbol { id: 11, marker: PhantomData<fn() -> core::any::TypeId> } }), docs: [] } }, PortableType { id: 11, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Primitive(U64), docs: [] } }, PortableType { id: 12, ty: Type { path: Path { segments: ["primitive_types", "H256"] }, type_params: [], type_def: Composite(TypeDefComposite { fields: [Field { name: None, ty: UntrackedSymbol { id: 1, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("[u8; 32]"), docs: [] }] }), docs: [] } }, PortableType { id: 13, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Sequence(TypeDefSequence { type_param: UntrackedSymbol { id: 2, marker: PhantomData<fn() -> core::any::TypeId> } }), docs: [] } }, PortableType { id: 14, ty: Type { path: Path { segments: ["sp_runtime", "generic", "digest", "Digest"] }, type_params: [], type_def: Composite(TypeDefComposite { fields: [Field { name: Some("logs"), ty: UntrackedSymbol { id: 15, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Vec<DigestItem>"), docs: [] }] }), docs: [] } }, PortableType { id: 15, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Sequence(TypeDefSequence { type_param: UntrackedSymbol { id: 16, marker: PhantomData<fn() -> core::any::TypeId> } }), docs: [] } }, PortableType { id: 16, ty: Type { path: Path { segments: ["sp_runtime", "generic", "digest", "DigestItem"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "PreRuntime", fields: [Field { name: None, ty: UntrackedSymbol { id: 17, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("ConsensusEngineId"), docs: [] }, Field { name: None, ty: UntrackedSymbol { id: 13, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Vec<u8>"), docs: [] }], index: 6, docs: [] }, Variant { name: "Consensus", fields: [Field { name: None, ty: UntrackedSymbol { id: 17, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("ConsensusEngineId"), docs: [] }, Field { name: None, ty: UntrackedSymbol { id: 13, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Vec<u8>"), docs: [] }], index: 4, docs: [] }, Variant { name: "Seal", fields: [Field { name: None, ty: UntrackedSymbol { id: 17, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("ConsensusEngineId"), docs: [] }, Field { name: None, ty: UntrackedSymbol { id: 13, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Vec<u8>"), docs: [] }], index: 5, docs: [] }, Variant { name: "Other", fields: [Field { name: None, ty: UntrackedSymbol { id: 13, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Vec<u8>"), docs: [] }], index: 0, docs: [] }, Variant { name: "RuntimeEnvironmentUpdated", fields: [], index: 8, docs: [] }] }), docs: [] } }, PortableType { id: 17, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Array(TypeDefArray { len: 4, type_param: UntrackedSymbol { id: 2, marker: PhantomData<fn() -> core::any::TypeId> } }), docs: [] } }, PortableType { id: 18, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Sequence(TypeDefSequence { type_param: UntrackedSymbol { id: 19, marker: PhantomData<fn() -> core::any::TypeId> } }), docs: [] } }, PortableType { id: 19, ty: Type { path: Path { segments: ["frame_system", "EventRecord"] }, type_params: [TypeParameter { name: "E", ty: Some(UntrackedSymbol { id: 20, marker: PhantomData<fn() -> core::any::TypeId> }) }, TypeParameter { name: "T", ty: Some(UntrackedSymbol { id: 12, marker: PhantomData<fn() -> core::any::TypeId> }) }], type_def: Composite(TypeDefComposite { fields: [Field { name: Some("phase"), ty: UntrackedSymbol { id: 76, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Phase"), docs: [] }, Field { name: Some("event"), ty: UntrackedSymbol { id: 20, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("E"), docs: [] }, Field { name: Some("topics"), ty: UntrackedSymbol { id: 77, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Vec<T>"), docs: [] }] }), docs: [] } }, PortableType { id: 20, ty: Type { path: Path { segments: ["encointer_node_notee_runtime", "RuntimeEvent"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "System", fields: [Field { name: None, ty: UntrackedSymbol { id: 21, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("frame_system::Event<Runtime>"), docs: [] }], index: 0, docs: [] }, Variant { name: "Sudo", fields: [Field { name: None, ty: UntrackedSymbol { id: 30, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_sudo::Event<Runtime>"), docs: [] }], index: 5, docs: [] }, Variant { name: "Balances", fields: [Field { name: None, ty: UntrackedSymbol { id: 34, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_balances::Event<Runtime>"), docs: [] }], index: 10, docs: [] }, Variant { name: "TransactionPayment", fields: [Field { name: None, ty: UntrackedSymbol { id: 36, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_transaction_payment::Event<Runtime>"), docs: [] }], index: 11, docs: [] }, Variant { name: "AssetTxPayment", fields: [Field { name: None, ty: UntrackedSymbol { id: 37, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_asset_tx_payment::Event<Runtime>"), docs: [] }], index: 12, docs: [] }, Variant { name: "Grandpa", fields: [Field { name: None, ty: UntrackedSymbol { id: 41, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_grandpa::Event"), docs: [] }], index: 25, docs: [] }, Variant { name: "Utility", fields: [Field { name: None, ty: UntrackedSymbol { id: 46, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_utility::Event"), docs: [] }], index: 40, docs: [] }, Variant { name: "Proxy", fields: [Field { name: None, ty: UntrackedSymbol { id: 47, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_proxy::Event<Runtime>"), docs: [] }], index: 44, docs: [] }, Variant { name: "Scheduler", fields: [Field { name: None, ty: UntrackedSymbol { id: 50, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_scheduler::Event<Runtime>"), docs: [] }], index: 48, docs: [] }, Variant { name: "EncointerScheduler", fields: [Field { name: None, ty: UntrackedSymbol { id: 53, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_encointer_scheduler::Event"), docs: [] }], index: 60, docs: [] }, Variant { name: "EncointerCeremonies", fields: [Field { name: None, ty: UntrackedSymbol { id: 55, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_encointer_ceremonies::Event<Runtime>"), docs: [] }], index: 61, docs: [] }, Variant { name: "EncointerCommunities", fields: [Field { name: None, ty: UntrackedSymbol { id: 60, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_encointer_communities::Event<Runtime>"), docs: [] }], index: 62, docs: [] }, Variant { name: "EncointerBalances", fields: [Field { name: None, ty: UntrackedSymbol { id: 74, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_encointer_balances::Event<Runtime>"), docs: [] }], index: 63, docs: [] }, Variant { name: "EncointerBazaar", fields: [Field { name: None, ty: UntrackedSymbol { id: 75, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("pallet_encointer_bazaar::Event<Runtime>"), docs: [] }], index: 64, docs: [] }] }), docs: [] } }, PortableType { id: 21, ty: Type { path: Path { segments: ["frame_system", "pallet", "Event"] }, type_params: [TypeParameter { name: "T", ty: None }], type_def: Variant(TypeDefVariant { variants: [Variant { name: "ExtrinsicSuccess", fields: [Field { name: Some("dispatch_info"), ty: UntrackedSymbol { id: 22, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("DispatchInfo"), docs: [] }], index: 0, docs: ["An extrinsic completed successfully."] }, Variant { name: "ExtrinsicFailed", fields: [Field { name: Some("dispatch_error"), ty: UntrackedSymbol { id: 25, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("DispatchError"), docs: [] }, Field { name: Some("dispatch_info"), ty: UntrackedSymbol { id: 22, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("DispatchInfo"), docs: [] }], index: 1, docs: ["An extrinsic failed."] }, Variant { name: "CodeUpdated", fields: [], index: 2, docs: ["`:code` was updated."] }, Variant { name: "NewAccount", fields: [Field { name: Some("account"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }], index: 3, docs: ["A new account was created."] }, Variant { name: "KilledAccount", fields: [Field { name: Some("account"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }], index: 4, docs: ["An account was reaped."] }, Variant { name: "Remarked", fields: [Field { name: Some("sender"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("hash"), ty: UntrackedSymbol { id: 12, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Hash"), docs: [] }], index: 5, docs: ["On on-chain remark happened."] }] }), docs: ["Event for the System pallet."] } }, PortableType { id: 22, ty: Type { path: Path { segments: ["frame_support", "dispatch", "DispatchInfo"] }, type_params: [], type_def: Composite(TypeDefComposite { fields: [Field { name: Some("weight"), ty: UntrackedSymbol { id: 9, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Weight"), docs: [] }, Field { name: Some("class"), ty: UntrackedSymbol { id: 23, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("DispatchClass"), docs: [] }, Field { name: Some("pays_fee"), ty: UntrackedSymbol { id: 24, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Pays"), docs: [] }] }), docs: [] } }, PortableType { id: 23, ty: Type { path: Path { segments: ["frame_support", "dispatch", "DispatchClass"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "Normal", fields: [], index: 0, docs: [] }, Variant { name: "Operational", fields: [], index: 1, docs: [] }, Variant { name: "Mandatory", fields: [], index: 2, docs: [] }] }), docs: [] } }, PortableType { id: 24, ty: Type { path: Path { segments: ["frame_support", "dispatch", "Pays"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "Yes", fields: [], index: 0, docs: [] }, Variant { name: "No", fields: [], index: 1, docs: [] }] }), docs: [] } }, PortableType { id: 25, ty: Type { path: Path { segments: ["sp_runtime", "DispatchError"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "Other", fields: [], index: 0, docs: [] }, Variant { name: "CannotLookup", fields: [], index: 1, docs: [] }, Variant { name: "BadOrigin", fields: [], index: 2, docs: [] }, Variant { name: "Module", fields: [Field { name: None, ty: UntrackedSymbol { id: 26, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("ModuleError"), docs: [] }], index: 3, docs: [] }, Variant { name: "ConsumerRemaining", fields: [], index: 4, docs: [] }, Variant { name: "NoProviders", fields: [], index: 5, docs: [] }, Variant { name: "TooManyConsumers", fields: [], index: 6, docs: [] }, Variant { name: "Token", fields: [Field { name: None, ty: UntrackedSymbol { id: 27, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("TokenError"), docs: [] }], index: 7, docs: [] }, Variant { name: "Arithmetic", fields: [Field { name: None, ty: UntrackedSymbol { id: 28, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("ArithmeticError"), docs: [] }], index: 8, docs: [] }, Variant { name: "Transactional", fields: [Field { name: None, ty: UntrackedSymbol { id: 29, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("TransactionalError"), docs: [] }], index: 9, docs: [] }, Variant { name: "Exhausted", fields: [], index: 10, docs: [] }, Variant { name: "Corruption", fields: [], index: 11, docs: [] }, Variant { name: "Unavailable", fields: [], index: 12, docs: [] }] }), docs: [] } }, PortableType { id: 26, ty: Type { path: Path { segments: ["sp_runtime", "ModuleError"] }, type_params: [], type_def: Composite(TypeDefComposite { fields: [Field { name: Some("index"), ty: UntrackedSymbol { id: 2, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("u8"), docs: [] }, Field { name: Some("error"), ty: UntrackedSymbol { id: 17, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("[u8; MAX_MODULE_ERROR_ENCODED_SIZE]"), docs: [] }] }), docs: [] } }, PortableType { id: 27, ty: Type { path: Path { segments: ["sp_runtime", "TokenError"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "FundsUnavailable", fields: [], index: 0, docs: [] }, Variant { name: "OnlyProvider", fields: [], index: 1, docs: [] }, Variant { name: "BelowMinimum", fields: [], index: 2, docs: [] }, Variant { name: "CannotCreate", fields: [], index: 3, docs: [] }, Variant { name: "UnknownAsset", fields: [], index: 4, docs: [] }, Variant { name: "Frozen", fields: [], index: 5, docs: [] }, Variant { name: "Unsupported", fields: [], index: 6, docs: [] }, Variant { name: "CannotCreateHold", fields: [], index: 7, docs: [] }, Variant { name: "NotExpendable", fields: [], index: 8, docs: [] }] }), docs: [] } }, PortableType { id: 28, ty: Type { path: Path { segments: ["sp_arithmetic", "ArithmeticError"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "Underflow", fields: [], index: 0, docs: [] }, Variant { name: "Overflow", fields: [], index: 1, docs: [] }, Variant { name: "DivisionByZero", fields: [], index: 2, docs: [] }] }), docs: [] } }, PortableType { id: 29, ty: Type { path: Path { segments: ["sp_runtime", "TransactionalError"] }, type_params: [], type_def: Variant(TypeDefVariant { variants: [Variant { name: "LimitReached", fields: [], index: 0, docs: [] }, Variant { name: "NoLayer", fields: [], index: 1, docs: [] }] }), docs: [] } }, PortableType { id: 30, ty: Type { path: Path { segments: ["pallet_sudo", "pallet", "Event"] }, type_params: [TypeParameter { name: "T", ty: None }], type_def: Variant(TypeDefVariant { variants: [Variant { name: "Sudid", fields: [Field { name: Some("sudo_result"), ty: UntrackedSymbol { id: 31, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("DispatchResult"), docs: [] }], index: 0, docs: ["A sudo just took place. \\[result\\]"] }, Variant { name: "KeyChanged", fields: [Field { name: Some("old_sudoer"), ty: UntrackedSymbol { id: 33, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Option<T::AccountId>"), docs: [] }], index: 1, docs: ["The \\[sudoer\\] just switched identity; the old key is supplied if one existed."] }, Variant { name: "SudoAsDone", fields: [Field { name: Some("sudo_result"), ty: UntrackedSymbol { id: 31, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("DispatchResult"), docs: [] }], index: 2, docs: ["A sudo just took place. \\[result\\]"] }] }), docs: ["\n\t\t\tThe [event](https://docs.substrate.io/main-docs/build/events-errors/) emitted\n\t\t\tby this pallet.\n\t\t\t"] } }, PortableType { id: 31, ty: Type { path: Path { segments: ["Result"] }, type_params: [TypeParameter { name: "T", ty: Some(UntrackedSymbol { id: 32, marker: PhantomData<fn() -> core::any::TypeId> }) }, TypeParameter { name: "E", ty: Some(UntrackedSymbol { id: 25, marker: PhantomData<fn() -> core::any::TypeId> }) }], type_def: Variant(TypeDefVariant { variants: [Variant { name: "Ok", fields: [Field { name: None, ty: UntrackedSymbol { id: 32, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: None, docs: [] }], index: 0, docs: [] }, Variant { name: "Err", fields: [Field { name: None, ty: UntrackedSymbol { id: 25, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: None, docs: [] }], index: 1, docs: [] }] }), docs: [] } }, PortableType { id: 32, ty: Type { path: Path { segments: [] }, type_params: [], type_def: Tuple(TypeDefTuple { fields: [] }), docs: [] } }, PortableType { id: 33, ty: Type { path: Path { segments: ["Option"] }, type_params: [TypeParameter { name: "T", ty: Some(UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }) }], type_def: Variant(TypeDefVariant { variants: [Variant { name: "None", fields: [], index: 0, docs: [] }, Variant { name: "Some", fields: [Field { name: None, ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: None, docs: [] }], index: 1, docs: [] }] }), docs: [] } }, PortableType { id: 34, ty: Type { path: Path { segments: ["pallet_balances", "pallet", "Event"] }, type_params: [TypeParameter { name: "T", ty: None }, TypeParameter { name: "I", ty: None }], type_def: Variant(TypeDefVariant { variants: [Variant { name: "Endowed", fields: [Field { name: Some("account"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("free_balance"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 0, docs: ["An account was created with some free balance."] }, Variant { name: "DustLost", fields: [Field { name: Some("account"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 1, docs: ["An account was removed whose balance was non-zero but below ExistentialDeposit,", "resulting in an outright loss."] }, Variant { name: "Transfer", fields: [Field { name: Some("from"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("to"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 2, docs: ["Transfer succeeded."] }, Variant { name: "BalanceSet", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("free"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 3, docs: ["A balance was set by root."] }, Variant { name: "Reserved", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 4, docs: ["Some balance was reserved (moved from free to reserved)."] }, Variant { name: "Unreserved", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 5, docs: ["Some balance was unreserved (moved from reserved to free)."] }, Variant { name: "ReserveRepatriated", fields: [Field { name: Some("from"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("to"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }, Field { name: Some("destination_status"), ty: UntrackedSymbol { id: 35, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("Status"), docs: [] }], index: 6, docs: ["Some balance was moved from the reserve of the first account to the second account.", "Final argument indicates the destination balance type."] }, Variant { name: "Deposit", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 7, docs: ["Some amount was deposited (e.g. for transaction fees)."] }, Variant { name: "Withdraw", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 8, docs: ["Some amount was withdrawn from the account (e.g. for transaction fees)."] }, Variant { name: "Slashed", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 9, docs: ["Some amount was removed from the account (e.g. for misbehavior)."] }, Variant { name: "Minted", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 10, docs: ["Some amount was minted into an account."] }, Variant { name: "Burned", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 11, docs: ["Some amount was burned from an account."] }, Variant { name: "Suspended", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 12, docs: ["Some amount was suspended from an account (it can be restored later)."] }, Variant { name: "Restored", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 13, docs: ["Some amount was restored into an account."] }, Variant { name: "Upgraded", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }], index: 14, docs: ["An account was upgraded."] }, Variant { name: "Issued", fields: [Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 15, docs: ["Total issuance was increased by `amount`, creating a credit to be balanced."] }, Variant { name: "Rescinded", fields: [Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 16, docs: ["Total issuance was decreased by `amount`, creating a debt to be balanced."] }, Variant { name: "Locked", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 17, docs: ["Some balance was locked."] }, Variant { name: "Unlocked", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 18, docs: ["Some balance was unlocked."] }, Variant { name: "Frozen", fields: [Field { name: Some("who"), ty: UntrackedSymbol { id: 0, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::AccountId"), docs: [] }, Field { name: Some("amount"), ty: UntrackedSymbol { id: 6, marker: PhantomData<fn() -> core::any::TypeId> }, type_name: Some("T::Balance"), docs: [] }], index: 19, docs: ["Some balance was frozen."] }, Variant { name: "Tha
...

@clangenb is that enough information?

@haerdib haerdib marked this pull request as ready for review June 14, 2023 09:52
@clangenb
Copy link
Member

Yes, for now, this is absolutely fine. We could find the error based on the metadata, but this shall be an extra step.

Copy link
Member

@clangenb clangenb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful. Thanks for this very quick implementation!

@clangenb clangenb merged commit 2c49edb into master Jun 14, 2023
@haerdib haerdib deleted the bh/api-client-tag-12 branch June 14, 2023 09:53
@haerdib
Copy link
Contributor Author

haerdib commented Jun 14, 2023

Yes, for now, this is absolutely fine. We could find the error based on the metadata, but this shall be an extra step.

If so, this function might be interesting for you: https://github.com/scs/substrate-api-client/blob/f11729e8d86e9c15ad891069b1a2f64d0ab0deb8/src/api/rpc_api/events.rs#L126

@clangenb
Copy link
Member

clangenb commented Jun 14, 2023

Absolutely! #329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

upgrade api-client dependency
2 participants