Skip to content

Commit

Permalink
Add more sysvar constants (#159)
Browse files Browse the repository at this point in the history
* Add more sysvar constants

* Update docs

* lint
  • Loading branch information
michaelhly committed Dec 24, 2021
1 parent e9678f9 commit eb03b09
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/solana/sysvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,20 @@

SYSVAR_STAKE_HISTORY_PUBKEY: PublicKey = PublicKey("SysvarStakeHistory1111111111111111111111111")
"""Public key of the synthetic account that serves the stake history."""

SYSVAR_EPOCH_SCHEDULE_PUBKEY: PublicKey = PublicKey("SysvarEpochSchedu1e111111111111111111111111")
"""The EpochSchedule sysvar contains epoch scheduling constants that are set in genesis, and enables calculating the
number of slots in a given epoch, the epoch for a given slot, etc. (Note: the epoch schedule is distinct from the
`leader schedule <https://docs.solana.com/terminology#leader-schedule>`_).
"""

SYSVAR_INSTRUCTIONS_PUBKEY: PublicKey = PublicKey("Sysvar1nstructions1111111111111111111111111")
"""
The Instructions sysvar contains the serialized instructions in a Message while that Message is being processed.
This allows program instructions to reference other instructions in the same transaction.
Read more information on `instruction introspection
<https://docs.solana.com/implemented-proposals/instruction_introspection>`_.
"""

SYSVAR_SLOT_HASHES_PUBKEY: PublicKey = PublicKey("SysvarS1otHashes111111111111111111111111111")
"""The SlotHashes sysvar contains the most recent hashes of the slot's parent banks. It is updated every slot."""

0 comments on commit eb03b09

Please sign in to comment.