TransactionInformation.fromMap constructor

TransactionInformation.fromMap(
  1. Map<String, dynamic> map
)

Implementation

TransactionInformation.fromMap(Map<String, dynamic> map)
    : blockHash = map['blockHash'] as String?,
      blockNumber = map['blockNumber'] != null
          ? BlockNum.exact(int.parse(map['blockNumber'] as String))
          : const BlockNum.pending(),
      from = EthereumAddress.fromHex(map['from'] as String),
      gas = int.parse(map['gas'] as String),
      gasPrice = EtherAmount.inWei(BigInt.parse(map['gasPrice'] as String)),
      hash = map['hash'] as String,
      input = hexToBytes(map['input'] as String),
      nonce = int.parse(map['nonce'] as String),
      to = map['to'] != null
          ? EthereumAddress.fromHex(map['to'] as String)
          : null,
      transactionIndex = map['transactionIndex'] != null
          ? int.parse(map['transactionIndex'] as String)
          : null,
      value = EtherAmount.inWei(BigInt.parse(map['value'] as String)),
      v = int.parse(map['v'] as String),
      r = hexToInt(map['r'] as String),
      s = hexToInt(map['s'] as String);