TransactionInformation.fromMap constructor

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

Implementation

TransactionInformation.fromMap(Map<String, dynamic> map)
  : blockHash = map['blockHash'],
    blockNumber =
        map['blockNumber'] != null
            ? BlockNum.exact(int.parse(map['blockNumber'] as String))
            : const BlockNum.pending(),
    from = XCBAddress.fromHex(map['from'] as String),
    energy = int.parse(map['energy'] as String),
    energyPrice = XCBAmount.inOre(BigInt.parse(map['energyPrice'] as String)),
    hash = map['hash'] as String,
    input = hexToBytes(map['input'] as String),
    nonce = int.parse(map['nonce'] as String),
    to = map['to'] != null ? XCBAddress.fromHex(map['to'] as String) : null,
    transactionIndex =
        map['transactionIndex'] != null
            ? int.parse(map['transactionIndex'] as String)
            : null,
    value = XCBAmount.inOre(BigInt.parse(map['value'] as String)),
    signature = hexToBytes(strip0x(map['signature'] as String));