AbiFunctionFragment.fromJson constructor

AbiFunctionFragment.fromJson(
  1. Map<String, dynamic> json
)

Creates an instance of AbiFunctionFragment from JSON representation.

Implementation

factory AbiFunctionFragment.fromJson(Map<String, dynamic> json) {
  final List<dynamic> inputs = json["inputs"] ?? [];
  final List<dynamic> outputs = json["outputs"] ?? [];
  return AbiFunctionFragment(
      name: json["name"],
      inputs: inputs.map((e) => AbiParameter.fromJson(e)).toList(),
      outputs: outputs.map((e) => AbiParameter.fromJson(e)).toList(),
      stateMutability: StateMutability.fromName(json["stateMutability"]),
      constant: json["constant"],
      payable: json["payable"]);
}