diff --git a/Sources/ContractABI/ABI/ABIDecoder.swift b/Sources/ContractABI/ABI/ABIDecoder.swift index 0c3affe5..684f7c9d 100644 --- a/Sources/ContractABI/ABI/ABIDecoder.swift +++ b/Sources/ContractABI/ABI/ABIDecoder.swift @@ -68,6 +68,11 @@ public struct ABIDecoder { let hexString = hexString.replacingOccurrences(of: "0x", with: "") + if hexString.isEmpty { + // Return an empty dictionary or handle accordingly + return [:] + } + var returnDictionary: [String: Any] = [:] if outputs.count == 1 {