Alias for Runtime{Call, Event} types (#5477)

* Alias for Runtime{Call, Event} types

* CHANGELOG
This commit is contained in:
Jaco
2023-02-07 14:17:29 +02:00
committed by GitHub
parent 142390f27d
commit 76bf7a0079
5 changed files with 22 additions and 2 deletions
@@ -168,6 +168,8 @@ export default {
Releases: {
_enum: ['V1', 'V2', 'V3', 'V4', 'V5', 'V6', 'V7', 'V8', 'V9', 'V10']
},
RuntimeCall: 'Call',
RuntimeEvent: 'Event',
RuntimeDbWeight: {
read: 'Weight',
write: 'Weight'
@@ -6,7 +6,7 @@ import type { Bytes, Compact, DoNotConstruct, Enum, Int, Null, Option, Struct, U
import type { ITuple } from '@polkadot/types-codec/types';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
import type { Signature } from '@polkadot/types/interfaces/extrinsics';
import type { SystemOrigin } from '@polkadot/types/interfaces/system';
import type { Event, SystemOrigin } from '@polkadot/types/interfaces/system';
/** @name AccountId */
export interface AccountId extends AccountId32 {}
@@ -306,12 +306,18 @@ export interface Releases extends Enum {
readonly type: 'V1' | 'V2' | 'V3' | 'V4' | 'V5' | 'V6' | 'V7' | 'V8' | 'V9' | 'V10';
}
/** @name RuntimeCall */
export interface RuntimeCall extends Call {}
/** @name RuntimeDbWeight */
export interface RuntimeDbWeight extends Struct {
readonly read: Weight;
readonly write: Weight;
}
/** @name RuntimeEvent */
export interface RuntimeEvent extends Event {}
/** @name Seal */
export interface Seal extends ITuple<[ConsensusEngineId, Bytes]> {}
@@ -66,6 +66,9 @@ const PATHS_ALIAS = splitNamespace([
// shorten some well-known types
'primitive_types::*',
'sp_arithmetic::per_things::*',
// runtime
'*_runtime::RuntimeCall',
'*_runtime::RuntimeEvent',
// ink!
'ink_env::types::*',
'ink_primitives::types::*'