github.com/gagliardetto/solana-go@v1.11.0/sysvar.go (about) 1 // Copyright 2021 github.com/gagliardetto 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 package solana 16 17 // See more here: https://github.com/solana-labs/solana/blob/master/docs/src/developing/runtime-facilities/sysvars.md 18 19 // From https://github.com/solana-labs/solana/blob/94ab0eb49f1bce18d0a157dfe7a2bb1fb39dbe2c/docs/src/developing/runtime-facilities/sysvars.md 20 var ( 21 // The Clock sysvar contains data on cluster time, 22 // including the current slot, epoch, and estimated wall-clock Unix timestamp. 23 // It is updated every slot. 24 SysVarClockPubkey = MustPublicKeyFromBase58("SysvarC1ock11111111111111111111111111111111") 25 26 // The EpochSchedule sysvar contains epoch scheduling constants that are set in genesis, 27 // and enables calculating the number of slots in a given epoch, 28 // the epoch for a given slot, etc. 29 // (Note: the epoch schedule is distinct from the leader schedule) 30 SysVarEpochSchedulePubkey = MustPublicKeyFromBase58("SysvarEpochSchedu1e111111111111111111111111") 31 32 // The Fees sysvar contains the fee calculator for the current slot. 33 // It is updated every slot, based on the fee-rate governor. 34 SysVarFeesPubkey = MustPublicKeyFromBase58("SysvarFees111111111111111111111111111111111") 35 36 // The Instructions sysvar contains the serialized instructions in a Message while that Message is being processed. 37 // This allows program instructions to reference other instructions in the same transaction. 38 SysVarInstructionsPubkey = MustPublicKeyFromBase58("Sysvar1nstructions1111111111111111111111111") 39 40 // The RecentBlockhashes sysvar contains the active recent blockhashes as well as their associated fee calculators. 41 // It is updated every slot. 42 // Entries are ordered by descending block height, 43 // so the first entry holds the most recent block hash, 44 // and the last entry holds an old block hash. 45 SysVarRecentBlockHashesPubkey = MustPublicKeyFromBase58("SysvarRecentB1ockHashes11111111111111111111") 46 47 // The Rent sysvar contains the rental rate. 48 // Currently, the rate is static and set in genesis. 49 // The Rent burn percentage is modified by manual feature activation. 50 SysVarRentPubkey = MustPublicKeyFromBase58("SysvarRent111111111111111111111111111111111") 51 52 // 53 SysVarRewardsPubkey = MustPublicKeyFromBase58("SysvarRewards111111111111111111111111111111") 54 55 // The SlotHashes sysvar contains the most recent hashes of the slot's parent banks. 56 // It is updated every slot. 57 SysVarSlotHashesPubkey = MustPublicKeyFromBase58("SysvarS1otHashes111111111111111111111111111") 58 59 // The SlotHistory sysvar contains a bitvector of slots present over the last epoch. It is updated every slot. 60 SysVarSlotHistoryPubkey = MustPublicKeyFromBase58("SysvarS1otHistory11111111111111111111111111") 61 62 // The StakeHistory sysvar contains the history of cluster-wide stake activations and de-activations per epoch. 63 // It is updated at the start of every epoch. 64 SysVarStakeHistoryPubkey = MustPublicKeyFromBase58("SysvarStakeHistory1111111111111111111111111") 65 )