Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyouxin committed Aug 12, 2022
1 parent 306ae30 commit 81eddca
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/light-godwoken/src/__tests__/codec.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { BI, core, toolkit } from "@ckb-lumos/lumos";
import { BI, toolkit } from "@ckb-lumos/lumos";
import { V0DepositLockArgs } from "../schemas/codecV0";
import { V1DepositLockArgs } from "../schemas/codecV1";
import { OmniLockWitnessLockCodec } from "../schemas/codecLayer1";
import { bytes } from "@ckb-lumos/codec";
import { blockchain } from "@ckb-lumos/base";
describe("test codec", () => {
it("should codec omnilock", async () => {
const signature = "0x22506400d99d605caa6a047ea3146a0ef8ac87ad38cb4549b64ca025640315f6";
const serilized = new toolkit.Reader(
core.SerializeWitnessArgs({
lock: OmniLockWitnessLockCodec.pack({ signature }).buffer,
const serilized = bytes.hexify(
blockchain.WitnessArgs.pack({
lock: OmniLockWitnessLockCodec.pack({ signature }),
}),
).serializeJson();
);

expect(serilized).toEqual(
"0x4800000010000000480000004800000034000000340000001000000034000000340000002000000022506400d99d605caa6a047ea3146a0ef8ac87ad38cb4549b64ca025640315f6",
Expand Down

0 comments on commit 81eddca

Please sign in to comment.