Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Roll a @solana/sysvars package for working with Sysvars #2041

Closed
buffalojoec opened this issue Jan 16, 2024 · 1 comment · Fixed by #2300
Closed

Roll a @solana/sysvars package for working with Sysvars #2041

buffalojoec opened this issue Jan 16, 2024 · 1 comment · Fixed by #2300
Assignees
Labels
enhancement New feature or request

Comments

@buffalojoec
Copy link
Contributor

Motivation

Having a package with helpers used by and re-exported by the main library for working with Sysvars might be quite convenient. It could leverage fetchAccount from @solana/accounts and the types from @solana/rpc-parsed-types to build nice helpers for fetching Sysvars.

Example use case

import { getClock, JsonParsedClockAccount } from `@solana/sysvars`;

const clock: JsonParsedClockAccount = await getClock();

I am not 100% sure how necessary sysvars are from a client perspective, but if there's potential for this to be useful let's do it!

Copy link
Contributor

Because there has been no activity on this issue for 7 days since it was closed, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants