From 8acbf7a53987acfbcabbb0d30a42e6ae77a7f60d Mon Sep 17 00:00:00 2001 From: David Hernando Date: Mon, 23 Dec 2024 19:21:32 +0100 Subject: [PATCH] entry point string is not a calltable. just string with length prefix. --- src/types/TransactionEntryPoint.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/types/TransactionEntryPoint.ts b/src/types/TransactionEntryPoint.ts index e5a1c8962..8000dcc30 100644 --- a/src/types/TransactionEntryPoint.ts +++ b/src/types/TransactionEntryPoint.ts @@ -125,14 +125,8 @@ export class TransactionEntryPoint { this.type === TransactionEntryPointEnum.Custom && this.customEntryPoint ) { - const customSerialization = new CalltableSerialization(); - customSerialization.addField(0, Uint8Array.from([1])); - customSerialization.addField( - 1, - CLValueString.newCLString(this.customEntryPoint).bytes() - ); - - calltableSerialization.addField(1, customSerialization.toBytes()); + const entryPointBytes = CLValueString.newCLString(this.customEntryPoint).bytes() + calltableSerialization.addField(1, entryPointBytes); } return calltableSerialization.toBytes();