Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Changes:
- Only explicitly support LSB on `BitVec` types
- Change `toHuman` on `BitVec` to output default LSB
- Add `bytes{Sent, Recv}` to provider stats
- Add support for `dev_getBlockStats` RPC


## 7.13.1 Mar 19, 2022
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/interfaces/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export { default as collective } from './collective/definitions';
export { default as consensus } from './consensus/definitions';
export { default as contracts } from './contracts/definitions';
export { default as democracy } from './democracy/definitions';
export { default as dev } from './dev/definitions';
export { default as elections } from './elections/definitions';
export { default as engine } from './engine/definitions';
export { default as evm } from './evm/definitions';
Expand Down
31 changes: 31 additions & 0 deletions packages/types/src/interfaces/dev/definitions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2017-2022 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0

// order important in structs... :)
/* eslint-disable sort-keys */

import type { Definitions } from '../../types';

export default {
rpc: {
getBlockStats: {
description: 'Reexecute the specified `block_hash` and gather statistics while doing so',
params: [
{
name: 'at',
type: 'Hash',
isHistoric: true
}
],
type: 'Option<BlockStats>'
}
},
types: {
BlockStats: {
witnessLen: 'u64',
witnessCompactLen: 'u64',
blockLen: 'u64',
blockNumExtrinsics: 'u64'
}
}
} as Definitions;