I want to use action context information, such as block hash code, to generate number as "random" numbers in smart contract.
But I can't find any interface to get block hash code.
I want to use action context information, such as block hash code, to generate number as "random" numbers in smart contract.
But I can't find any interface to get block hash code.
Block information isn't directly available. These two functions provide information from a user-selected previous block:
int tapos_block_num();
int tapos_block_prefix();
There are a couple problems with relying on these: