Skip to content

Commit 8d4f1c8

Browse files
committed
Remove serialization logic, since container outputs (with all keys) should already be abi-encoded (hex string format)
1 parent 68a0770 commit 8d4f1c8

1 file changed

Lines changed: 3 additions & 18 deletions

File tree

src/chain/processor.ts

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,6 @@ export class ChainProcessor extends AsyncTask {
163163
.function()
164164
.args(UnionIDSchema)
165165
.returns(z.boolean()),
166-
_serialize_param: z
167-
.function()
168-
.args(z.string().optional())
169-
.returns(HexSchema),
170166
_serialize_container_output: z
171167
.function()
172168
.args(ContainerOutputSchema)
@@ -574,11 +570,6 @@ export class ChainProcessor extends AsyncTask {
574570
}
575571
);
576572

577-
// Serializes container output param as bytes.
578-
#serialize_param = ChainProcessor.methodSchemas._serialize_param.implement(
579-
(input) => stringToHex(input ?? '')
580-
);
581-
582573
// Serializes container output to conform to on-chain fn input.
583574
#serialize_container_output =
584575
ChainProcessor.methodSchemas._serialize_container_output.implement(
@@ -604,10 +595,7 @@ export class ChainProcessor extends AsyncTask {
604595
type: 'bytes',
605596
},
606597
],
607-
[
608-
this.#serialize_param(output['raw_input']),
609-
this.#serialize_param(output['processed_input']),
610-
]
598+
[output['raw_input'], output['processed_input']]
611599
),
612600
encodeAbiParameters(
613601
[
@@ -618,12 +606,9 @@ export class ChainProcessor extends AsyncTask {
618606
type: 'bytes',
619607
},
620608
],
621-
[
622-
this.#serialize_param(output['raw_output']),
623-
this.#serialize_param(output['processed_output']),
624-
]
609+
[output['raw_output'], output['processed_output']]
625610
),
626-
this.#serialize_param(output['proof']),
611+
output['proof'],
627612
];
628613
}
629614

0 commit comments

Comments
 (0)