serializedUnsigned property
Implementation
Uint8List get serializedUnsigned {
final _nonce = nonce.bigIntToBytes.toHex;
final _maxFeePerGas = maxFeePerGas.bigIntToBytes.toHex;
final _maxPriorityFeePerGas = maxPriorityFeePerGas.bigIntToBytes.toHex;
final _gasLimit = gasLimit.bigIntToBytes.toHex;
final _to = to.replaceFirst("0x", "");
final _value = value.bigIntToBytes.toHex;
final _data = data.toHex;
final _accessList = accessList.map((item) {
return [
item.address.replaceFirst("0x", ""),
item.storageKeys,
];
}).toList();
List<dynamic> buffer = [
chainId.toBI.bigIntToBytes.toHex,
_nonce,
_maxPriorityFeePerGas,
_maxFeePerGas,
_gasLimit,
_to,
_value,
_data,
_accessList,
];
return Uint8List.fromList(
[0x02, ...rlpEncode(buffer).hexToBytes],
);
}