1

How can i generate random number in contract?
Like this:

uint8(uint256(keccak256(block.timestamp, block.difficulty))%251);

but we cannot trust miner, this is not 100% random
Or use Oraclize:

oraclize_query("WolframAlpha", "random number between 0 and 100");

If it's correct? Will i get a effective random number? And how much gas usage?

Browse other questions tagged or ask your own question.