diff --git a/lib/utilities/extensions/impl/contract_abi.dart b/lib/utilities/extensions/impl/contract_abi.dart index c5a2877d8..eae0f2da4 100644 --- a/lib/utilities/extensions/impl/contract_abi.dart +++ b/lib/utilities/extensions/impl/contract_abi.dart @@ -20,13 +20,15 @@ extension ContractAbiExtensions on ContractAbi { final anonymous = json["anonymous"] as bool? ?? false; final List> components = []; - for (final input in json["inputs"] as List) { - components.add( - EventComponent( - _parseParam(input as Map), - input['indexed'] as bool? ?? false, - ), - ); + if (json["inputs"] is List) { + for (final input in json["inputs"] as List) { + components.add( + EventComponent( + _parseParam(input as Map), + input['indexed'] as bool? ?? false, + ), + ); + } } events.add(ContractEvent(anonymous, name, components));