From 9301515081d6507b24ede08a217672ccad5e9ee3 Mon Sep 17 00:00:00 2001 From: penuel Date: Thu, 23 May 2024 18:28:40 +0800 Subject: [PATCH] Fixed DefaultFunctionEncoder calculating offset for nested StaticArray (#2054) Signed-off-by: penuel.li --- abi/src/main/java/org/web3j/abi/DefaultFunctionEncoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abi/src/main/java/org/web3j/abi/DefaultFunctionEncoder.java b/abi/src/main/java/org/web3j/abi/DefaultFunctionEncoder.java index 6dcbfabf71..4a1b6ca067 100644 --- a/abi/src/main/java/org/web3j/abi/DefaultFunctionEncoder.java +++ b/abi/src/main/java/org/web3j/abi/DefaultFunctionEncoder.java @@ -99,7 +99,7 @@ private static int getLength(final List parameters) { ((StaticArray) type).getComponentType())) { count++; } else if (type instanceof StaticArray) { - count += ((StaticArray) type).getValue().size(); + count += getLength(((StaticArray) type).getValue()); } else { count++; }