Update sysvar docs (#18125) (#18147)

(cherry picked from commit 8a136736ad)

Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
mergify[bot]
2021-06-22 17:28:15 +00:00
committed by GitHub
parent 1a919e0c3e
commit b14af989b8

View File

@ -17,6 +17,12 @@ The first is to query the sysvar at runtime via the sysvar's `get()` function:
let clock = Clock::get() 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 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_. always _readonly_.