I'm looking through a contract and it casts a blockhash into a
uint32, then divides by 42949673 in order to attempt to get a random number between 0 and 100. I assume a blockhash is equivalent to a
uint256, but would casting into a
uint32 take the most significant 32 bits or the least significant 32 bits? It would make the number smaller either way, but is it chopping off the larger amount or effectively dividing by enough to make it fit into a
I ask because every block I look at has the least significant bits as zeros, after being converted into binary. I haven't looked at many, but none of the blocks I have looked at have had anything other than a stream of zeros in the least significant bits. On top of this, the contract has generated a low number each time I've rolled, which again isn't a whole lot but the odds that this happens at random is decreasing with each roll. Is this as ineffective at generating a random number as it seems, or am I just beating the odds?