serializeUnsignedData method
override
Implementation
Future<Uint8List> serializeUnsignedData() async {
var sb = ScriptBuilder();
sb.pushNum(version);
sb.pushNum(type.value);
gasPrice = gasPrice ?? 0;
gasLimit = gasLimit ?? 20000;
payer = payer ??
await Address.fromValue('0000000000000000000000000000000000000000');
sb.pushRawBytes(Convert.hexStrToBytes(nonce));
sb.pushNum(gasPrice, len: 8, bigEndian: false);
sb.pushNum(gasLimit, len: 8, bigEndian: false);
sb.pushRawBytes(payer.value);
if (payload == null) throw ArgumentError('Empty payload');
sb.pushRawBytes(payload.serialize());
sb.pushNum(0);
return sb.buf.bytes;
}