fetchSysvarLastRestartSlot function
Fetches the LastRestartSlot sysvar account using the provided RPC
client.
Implementation
Future<SysvarLastRestartSlot> fetchSysvarLastRestartSlot(
Rpc rpc, {
FetchAccountConfig? config,
}) async {
final account = await fetchEncodedSysvarAccount(
rpc,
sysvarLastRestartSlotAddress,
config: config,
);
assertAccountExists(account);
final decoded = decodeAccount(
(account as ExistingAccount<Uint8List>).account,
getSysvarLastRestartSlotDecoder(),
);
return decoded.data;
}