From 9c2a67f2d79171b19d96942601d6902aa762edf6 Mon Sep 17 00:00:00 2001 From: Adam Gall Date: Fri, 3 May 2024 16:52:34 -0400 Subject: [PATCH] Fix ABI generation and function encoding --- src/utils/crypto.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/utils/crypto.ts b/src/utils/crypto.ts index 80ce8b4099..a9196af3a9 100644 --- a/src/utils/crypto.ts +++ b/src/utils/crypto.ts @@ -71,11 +71,20 @@ export const encodeFunction = ( } }); - return encodeFunctionData({ - functionName: _functionName, + const abi = [ + { + inputs: parseAbiParameters(_functionSignature), + name: _functionName, + type: 'function', + }, + ]; + + const functionData = encodeFunctionData({ args: parametersFixedWithBool, - abi: parseAbiParameters(_functionSignature || ''), + abi, }); + + return functionData; }; export function isMultiSigTx(transaction: ActivityTransactionType): boolean {