SmartContract.deserialize constructor
SmartContract.deserialize(
- List<int> bytes
)
Implementation
factory SmartContract.deserialize(List<int> bytes) {
final decode = TronProtocolBufferImpl.decode(bytes);
return SmartContract(
originAddress: TronAddress.fromBytes(decode.getField(1)),
bytecode: decode.getField(4),
callValue: decode.getField(5),
abi: decode.getResult(3)?.castTo<SmartContractABI, List<int>>(
(e) => SmartContractABI.deserialize(e)),
consumeUserResourcePercent: decode.getField(6),
name: decode.getField(7),
originEnergyLimit: decode.getField(8),
trxHash: decode.getField(10),
codeHash: decode.getField(9),
version: decode.getField(11),
contractAddress: decode
.getResult(2)
?.castTo<TronAddress, List<int>>((e) => TronAddress.fromBytes(e)));
}