@moonwall/util
Version:
Testing framework for the Moon family of projects
13 lines (12 loc) • 811 B
TypeScript
import "@moonbeam-network/api-augment";
import type { u128 } from "@polkadot/types-codec";
import type { AccountId20, DispatchError, DispatchInfo, EventRecord } from "@polkadot/types/interfaces";
export declare function filterAndApply<T>(events: EventRecord[], section: string, methods: string[], onFound: (record: EventRecord) => T): T[];
export declare function getDispatchError({ event: { data: [dispatchError], }, }: EventRecord): DispatchError;
export declare function extractError(events?: EventRecord[]): DispatchError | undefined;
export declare function isExtrinsicSuccessful(events?: EventRecord[]): boolean;
export declare function extractInfo(events?: EventRecord[]): DispatchInfo | undefined;
export declare function extractFee(events?: EventRecord[]): {
who: AccountId20;
amount: u128;
};