hey guys, I have a couple of questions regarding randomness in solidity
1 - is it better to use block.timestamp or block.hash?
2 - how is it possible that this.block.hash even exists in solidity? there should be an infinite loop right?
here is an example
if this.block.hash%4 == 1
{
send 10 eth to Bill
}
in this case, if the condition is True then the smart contract sends 10 eth to Bill;
well, there is a problem here, if the smart contract sends 10 Eth to Bill than it makes another transaction, that might change the block hash ( can someone tell me what I'm missing here ? thankss)
[link] [comments]
You can get bonuses upto $100 FREE BONUS when you:
π° Install these recommended apps:
π² SocialGood - 100% Crypto Back on Everyday Shopping
π² xPortal - The DeFi For The Next Billion
π² CryptoTab Browser - Lightweight, fast, and ready to mine!
π° Register on these recommended exchanges:
π‘ Binanceπ‘ Bitfinexπ‘ Bitmartπ‘ Bittrexπ‘ Bitget
π‘ CoinExπ‘ Crypto.comπ‘ Gate.ioπ‘ Huobiπ‘ Kucoin.
Comments