Event definitions (#350)
* Event definitions * Compact things a bit * Cleanup AccountIndex decoding, align Address * Remove stand-alone MethodIndex (declutter) * Inject metadata into Event from api * Update API TODOs to reflect current state * Update & expand comments * EventData only takes Uint8Array inputs (via EventRecord) * Remove duplicated toHex * Add FIXME with link to base issue
This commit is contained in:
committed by
Amaury Martiny
parent
06079c424e
commit
4997d8fb06
@@ -13,6 +13,7 @@ import storageFromMeta from '@polkadot/storage/fromMetadata';
|
||||
import storageStatic from '@polkadot/storage/static';
|
||||
import { Vector } from '@polkadot/types/codec';
|
||||
import { Hash, Method } from '@polkadot/types/index';
|
||||
import Event from '@polkadot/types/Event';
|
||||
import { StorageFunction } from '@polkadot/types/StorageKey';
|
||||
import { assert, isUndefined } from '@polkadot/util';
|
||||
|
||||
@@ -61,6 +62,7 @@ export default class ApiBase {
|
||||
ApiBase.extrinsics = extrinsicsFromMeta(meta);
|
||||
ApiBase.storage = storageFromMeta(meta);
|
||||
|
||||
Event.injectMetadata(meta);
|
||||
Method.injectExtrinsics(ApiBase.extrinsics);
|
||||
|
||||
if (!isReady) {
|
||||
|
||||
Reference in New Issue
Block a user