MCPcopy Create free account
hub / github.com/subquery/subql / wrapBlock

Function wrapBlock

packages/node/src/utils/substrate.ts:65–75  ·  view source on GitHub ↗
(
  signedBlock: SignedBlock,
  events: EventRecord[],
  specVersion: number,
)

Source from the content-addressed store, hash-verified

63}
64
65export function wrapBlock(
66 signedBlock: SignedBlock,
67 events: EventRecord[],
68 specVersion: number,
69): SubstrateBlock {
70 return merge(signedBlock, {
71 timestamp: getTimestamp(signedBlock),
72 specVersion: specVersion,
73 events,
74 });
75}
76
77export function getTimestamp({
78 block: { extrinsics },

Callers 2

fetchBlocksBatchesFunction · 0.85

Calls 1

getTimestampFunction · 0.85

Tested by

no test coverage detected