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

Commit

Permalink
Update sysvar docs (#18125) (#18147)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8a13673)

Co-authored-by: Jack May <[email protected]>
  • Loading branch information
mergify[bot] and jackcmay authored Jun 22, 2021
1 parent 1a919e0 commit b14af98
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/src/developing/runtime-facilities/sysvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ The first is to query the sysvar at runtime via the sysvar's `get()` function:
let clock = Clock::get()
```

The following sysvars support `get`:
- Clock
- EpochSchedule
- Fees
- Rent

The second is to pass the sysvar to the program as an account by including its address as one of the accounts in the `Instruction` and then deserializing the data during execution. Access to sysvars accounts is
always _readonly_.

Expand Down

0 comments on commit b14af98

Please sign in to comment.