EIP712Base.fromJson constructor

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

Implementation

factory EIP712Base.fromJson(Map<String, dynamic> json) {
  final version = EIP712Version.fromVersion(json["version"]);
  switch (version) {
    case EIP712Version.v1:
      return EIP712Legacy.fromJson(json["types"]);
    default:
      return Eip712TypedData.fromJson(json, version: version);
  }
}