Questions tagged [sysvar]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
37 views

Is the Epoch Rewards sysvar deprecated?

The sysvar documentation gives the address of the Epoch Rewards account as SysvarEpochRewards1111111111111111111111111 Using getAccountInfo, I'm getting "value": null for this address on ...
Callum M's user avatar
  • 2,875
0 votes
1 answer
422 views

How do I get the recent blockhashses during program execution?

I want to get the latest blockhash (or last 10 or so) during program execution. The goal is prove that the tx was created and executed in real time. Here are the steps that I am thinking: get latest ...
larry 8's user avatar
  • 23
2 votes
1 answer
137 views

Source of slot_hash and current timestamp on chain

I know the Clock and Slothashes sysvars return a current timestamp and history of slot hashes, but my question is where this data comes from? Is this the timestamp that correlates to the latest ...
kwelliott's user avatar
  • 504
6 votes
2 answers
191 views

what does the sysvar PUBKEYs do?

can someone explain what is SYSVAR_RENT_PUBKEY, and all the related PUBKEY defined in @solana/web3.js?
felix's user avatar
  • 270
7 votes
2 answers
301 views

What is the use for `program_id` in program's entrypoint

All Solana programs receive its own program_id as a parameter. But I don't see how this is useful, as you can use declare_id to declare it in case you need it. I've also seen that if you get your ...
RowanStone's user avatar
1 vote
1 answer
45 views

Compare start Time in account state from context and current time of SYSVAR clock

I have a condition like let now = Clock::get()?.unix_timestamp as u64; if now <= account.start_time { // throw Error } So if the user send the start time from the front end and then it compare the ...
Aslam's user avatar
  • 423
0 votes
1 answer
122 views

Mocking the Clock sysvar in solana_program_test

I have a program as follows: Some state is initialized with a start_time Another instruction can be executed on that state, but only if the clock sysvar has passed the given start_time In my tests (...
oscarb.sol's user avatar
6 votes
1 answer
222 views

What is the behavior of the Instructions sysvar during CPI calls?

As a followup to in a program, is it possible to tell if an instruction was invoked by a CPI call?, I was curious if the instructions sysvar would ever contain CPI instruction data. For a more ...
Ripleys 0x's user avatar