diff --git a/examples/molecule-codegen-dir/generated/common/basic_types.ts b/examples/molecule-codegen-dir/generated/common/basic_types.ts index 19269563c..6ad145edc 100644 --- a/examples/molecule-codegen-dir/generated/common/basic_types.ts +++ b/examples/molecule-codegen-dir/generated/common/basic_types.ts @@ -3,12 +3,9 @@ import { bytes, createBytesCodec, createFixedBytesCodec, molecule } from "@ckb-lumos/codec"; import { Uint32, Uint64, Uint128, DepType, HashType } from '../../customized' -const { array, vector, union, option, struct, table } = molecule; +const { array, vector, union, option, struct, table, byteVecOf } = molecule; -const fallbackBytesCodec = createBytesCodec({ - pack: bytes.bytify, - unpack: bytes.hexify, -}); +const fallbackBytesCodec = byteVecOf({ pack: bytes.bytify, unpack: bytes.hexify }); function createFallbackFixedBytesCodec(byteLength: number) { return createFixedBytesCodec({ diff --git a/examples/molecule-codegen-dir/generated/skills.ts b/examples/molecule-codegen-dir/generated/skills.ts index 60c92b0c7..5797ad904 100644 --- a/examples/molecule-codegen-dir/generated/skills.ts +++ b/examples/molecule-codegen-dir/generated/skills.ts @@ -4,12 +4,9 @@ import { bytes, createBytesCodec, createFixedBytesCodec, molecule } from "@ckb-l import { Uint32, Uint64, Uint128, DepType, HashType } from '../customized' import { AttrValue, SkillLevel, Uint8, Uint16 } from './common/basic_types' -const { array, vector, union, option, struct, table } = molecule; +const { array, vector, union, option, struct, table, byteVecOf } = molecule; -const fallbackBytesCodec = createBytesCodec({ - pack: bytes.bytify, - unpack: bytes.hexify, -}); +const fallbackBytesCodec = byteVecOf({ pack: bytes.bytify, unpack: bytes.hexify }); function createFallbackFixedBytesCodec(byteLength: number) { return createFixedBytesCodec({ diff --git a/examples/molecule-codegen/blockchain.ts b/examples/molecule-codegen/blockchain.ts index cffb4fd3d..a539c8660 100644 --- a/examples/molecule-codegen/blockchain.ts +++ b/examples/molecule-codegen/blockchain.ts @@ -1,15 +1,11 @@ // This file is generated by @ckb-lumos/molecule, please do not modify it manually. /* eslint-disable */ - import { bytes, createBytesCodec, createFixedBytesCodec, molecule } from "@ckb-lumos/codec"; import { Uint32, Uint64, Uint128, DepType, HashType } from './customized' -const { array, vector, union, option, struct, table } = molecule; +const { array, vector, union, option, struct, table, byteVecOf } = molecule; -const fallbackBytesCodec = createBytesCodec({ - pack: bytes.bytify, - unpack: bytes.hexify, -}); +const fallbackBytesCodec = byteVecOf({ pack: bytes.bytify, unpack: bytes.hexify }); function createFallbackFixedBytesCodec(byteLength: number) { return createFixedBytesCodec({ @@ -140,3 +136,4 @@ export const BlockV1 = table({ proposals: ProposalShortIdVec, extension: Bytes }, ['header', 'uncles', 'transactions', 'proposals', 'extension']); +