Skip to main content

BlockContext

@midnight-ntwrk/onchain-runtime v3.0.0


@midnight-ntwrk/onchain-runtime / BlockContext

Type Alias: BlockContext

type BlockContext: {
lastBlockTime: bigint;
parentBlockHash: string;
secondsSinceEpoch: bigint;
secondsSinceEpochErr: number;
};

Context information about the block forwarded to CallContext.

Type declaration

lastBlockTime

lastBlockTime: bigint;

The secondsSinceEpoch of the previous block

parentBlockHash

parentBlockHash: string;

The hash of the block prior to this transaction, as a hex-encoded string

secondsSinceEpoch

secondsSinceEpoch: bigint;

The seconds since the UNIX epoch that have elapsed

secondsSinceEpochErr

secondsSinceEpochErr: number;

The maximum error on secondsSinceEpoch that should occur, as a positive seconds value