Hello, everybody.
I have a validator which has paramer type of List<ByteArray>
validator (params: List<ByteArray>) {
func testscript(redeemer, context)
}
And when I create a validator and applyparams, I use the below code.
const compiledCode = blueprint.validators[0].compiledCode;
const ParamsSchema = Data.Array(Data.Bytes());
type Params = Data.Static<typeof ParamsSchema>;
const Params = ParamsSchema as unknown as Params;
const appliedCompliedCode = applyParamsToScript(compiledCode, [
Data.to(["1234", "5678"], Params),
]);
return {
type: "PlutusV2",
script: applyDoubleCborEncoding(appliedCompliedCode),
};
But it didn’t work.
It gives me error like this.
error: Uncaught (in promise) "Redeemer (Mint, 0): Failed to deserialise PlutusData using UnListData:\n\nCon(\n Data(\n BoundedBytes(\n BoundedBytes(\n [\n 216,\n 121,\n 159,\n 66,\n 18,\n 52,\n 66,\n 86,\n 120,\n 255,\n ],\n ),\n ),\n ),\n)\n\nExBudget {\n mem: 132,\n cpu: 32347,\n}\n\n"
Can anyone help me?