These are chat archives for ethereum/tutorials

Jun 2018
Jun 19 2018 05:03
@mustafa92348 The secretNumber is visible to everyone. So, a player can just check the secret number and then call play.
Jun 19 2018 05:19
Although, running this in remix, it looks like there is something odd happening. I wouldn't suggest playing. :)
Jun 19 2018 05:24

nice. Added a log statement before the check:

        emit Played(number, secretNumber);
        if (number == secretNumber) {

output in Remix

        "from": "0x038f160ad632409bfb18582241d9fd88c1a072ba",
        "topic": "0x2ed17a434754b5adc8698800cd2ceb72b8e24735a9bfcc62f7b542161a7c2208",
        "event": "Played",
        "args": {
            "0": "12",
            "1": "1154414090619811796818182302139415280051214250812",
            "number": "12",
            "secret": "1154414090619811796818182302139415280051214250812",
            "length": 2
Jun 19 2018 05:36
This is fascinating. Either I'm missing something obvious, or there is some low level bug here. Again DO NOT PLAY. You won't win.
Jun 19 2018 05:37
how to text comm in cantrract?
Jun 19 2018 05:41
My guess is that it has something to do with the way uint256 is converted to text. When converted to text, it appears to be a number between 0 and 16, but it's really not.
Jun 19 2018 06:04
Credit to @MicahZoltu for noticing that the assignment of game.player is overwriting secretNumber. game was not initialized normally, so its storage starts at the same offset as the contact. Assigning the first field of game overwrites the first field of CryptoRoulette. clever. :)
Jun 19 2018 06:27
Just and FYI, I opened an issue to see if the solidity team can prevent this sort of scam in the future. ethereum/solidity#4315
Jun 19 2018 10:42
hy there , someone here coud help me with the emit problem ?
Jun 19 2018 12:42
Hi... I'm Problem Widrawl ETH is etherscan. Pleass solution?
Jun 19 2018 15:28
hello world , how i can build my own cryptocoin , what method , guide to do that
anyone here
sounds no one here , uhhhhhhhhhhhhh
uh uh uh
Jun 19 2018 16:57
Thanx so sucses in Wallet ETH
Jun 19 2018 22:21
@malik19921992 contact them for rectify