DelegateResourceContract.deserialize constructor
DelegateResourceContract.deserialize(
- List<int> bytes
)
Implementation
factory DelegateResourceContract.deserialize(List<int> bytes) {
final decode = TronProtocolBufferImpl.decode(bytes);
return DelegateResourceContract(
ownerAddress: TronAddress.fromBytes(decode.getField(1)),
resource: decode.getResult(2)?.castTo<ResourceCode, int>(
(e) => ResourceCode.fromValue(decode.getField(2))),
balance: decode.getField(3),
receiverAddress: TronAddress.fromBytes(decode.getField(4)),
lock: decode.getField(5),
lockPeriod: decode.getField(6));
}