Skip to content

Commit

Permalink
chore: regenerate code to fix incorrect fallback Bytes codec
Browse files Browse the repository at this point in the history
  • Loading branch information
homura committed Aug 5, 2024
1 parent 42ed757 commit 1aee006
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
7 changes: 2 additions & 5 deletions examples/molecule-codegen-dir/generated/common/basic_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
7 changes: 2 additions & 5 deletions examples/molecule-codegen-dir/generated/skills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
9 changes: 3 additions & 6 deletions examples/molecule-codegen/blockchain.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down Expand Up @@ -140,3 +136,4 @@ export const BlockV1 = table({
proposals: ProposalShortIdVec,
extension: Bytes
}, ['header', 'uncles', 'transactions', 'proposals', 'extension']);

0 comments on commit 1aee006

Please sign in to comment.