import { Bool , ByteArray , BytesReader } from 'as-scale-codec' ; import { InherentData , Serialiser } from 'subsembly-core' ; import { Executive } from '../../frame/executive' ; import { UncheckedExtrinsic } from '../runtime' ; description description param data param len export function BlockBuilder_apply_extrinsic ( data , len ) { const input = Serialiser . deserialiseInput ( data , len ) ; const ext = BytesReader . decodeInto < UncheckedExtrinsic > ( input ) ; const result = Executive . applyExtrinsic ( ext ) ; return Serialiser . serialiseResult ( result ) ; } description param data param len export function BlockBuilder_inherent_extrinsics ( data , len ) { const input = Serialiser . deserialiseInput ( data , len ) ; const inherent = BytesReader . decodeInto < InherentData < ByteArray > > ( input ) ; const inherents = Executive . createExtrinsics ( inherent ) ; return Serialiser . serialiseResult ( inherents ) ; } description param data param len export function BlockBuilder_finalize_block ( data , len ) { const header = Executive . finalizeBlock ( ) ; return Serialiser . serialiseResult ( header . toU8a ( ) ) ; } description param data param len export function BlockBuilder_check_inherents ( data , len ) { return Serialiser . serialiseResult ( ( new Bool ( true ) ) . toU8a ( ) ) ; } description param data param len export function BlockBuilder_random_seed ( data , len ) { return Serialiser . serialiseResult ( [ ] ) ; }