Overview
ETH Balance
0.000001 ETH
Eth Value
Less Than $0.01 (@ $3,823.84/ETH)More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
EtherBet
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-06-20 */ pragma solidity ^0.4.24; contract EtherBet{ address gameOwner = address(0); bool locked = false; function bet() payable { if ((random()%2==1) && (msg.value == 1 ether) && (!locked)) { if (!msg.sender.call.value(2 ether)()) throw; } } function lock() { if (gameOwner==msg.sender) { locked = true; } } function unlock() { if (gameOwner==msg.sender) { locked = false; } } function own(address owner) { if ((gameOwner == address(0)) || (gameOwner == msg.sender)) { gameOwner = owner; } } function releaseFunds(uint amount) { if (gameOwner==msg.sender) { if (!msg.sender.call.value( amount * (1 ether))()) throw; } } function random() view returns (uint8) { return uint8(uint256(keccak256(block.timestamp, block.difficulty))%256); } function () public payable { bet(); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[],"name":"bet","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"releaseFunds","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"random","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"unlock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"owner","type":"address"}],"name":"own","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"lock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"}]
Contract Creation Code
608060405260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060146101000a81548160ff02191690831515021790555034801561006b57600080fd5b506104bd8061007b6000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806311610c25146100825780634d68282f1461008c5780635ec01e4d146100b9578063a69df4b5146100ea578063f349e3e314610101578063f83d08ba14610144575b61008061015b565b005b61008a61015b565b005b34801561009857600080fd5b506100b7600480360381019080803590602001909291905050506101eb565b005b3480156100c557600080fd5b506100ce610285565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100f657600080fd5b506100ff6102bb565b005b34801561010d57600080fd5b50610142600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061032d565b005b34801561015057600080fd5b5061015961041e565b005b60016002610167610285565b60ff1681151561017357fe5b0660ff1614801561018b5750670de0b6b3a764000034145b80156101a45750600060149054906101000a900460ff16155b156101e9573373ffffffffffffffffffffffffffffffffffffffff16671bc16d674ec8000060405160006040518083038185875af19250505015156101e857600080fd5b5b565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610282573373ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000820260405160006040518083038185875af192505050151561028157600080fd5b5b50565b6000610100424460405180838152602001828152602001925050506040518091039020600190048115156102b557fe5b06905090565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561032b5760008060146101000a81548160ff0219169083151502179055505b565b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806103d557503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1561041b57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561048f576001600060146101000a81548160ff0219169083151502179055505b5600a165627a7a72305820cf9d08887638f188812f5e495964ecc113a60b2e5245138e39a5cd8e4df9c2ae0029
Deployed Bytecode
0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806311610c25146100825780634d68282f1461008c5780635ec01e4d146100b9578063a69df4b5146100ea578063f349e3e314610101578063f83d08ba14610144575b61008061015b565b005b61008a61015b565b005b34801561009857600080fd5b506100b7600480360381019080803590602001909291905050506101eb565b005b3480156100c557600080fd5b506100ce610285565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100f657600080fd5b506100ff6102bb565b005b34801561010d57600080fd5b50610142600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061032d565b005b34801561015057600080fd5b5061015961041e565b005b60016002610167610285565b60ff1681151561017357fe5b0660ff1614801561018b5750670de0b6b3a764000034145b80156101a45750600060149054906101000a900460ff16155b156101e9573373ffffffffffffffffffffffffffffffffffffffff16671bc16d674ec8000060405160006040518083038185875af19250505015156101e857600080fd5b5b565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610282573373ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000820260405160006040518083038185875af192505050151561028157600080fd5b5b50565b6000610100424460405180838152602001828152602001925050506040518091039020600190048115156102b557fe5b06905090565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561032b5760008060146101000a81548160ff0219169083151502179055505b565b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806103d557503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1561041b57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561048f576001600060146101000a81548160ff0219169083151502179055505b5600a165627a7a72305820cf9d08887638f188812f5e495964ecc113a60b2e5245138e39a5cd8e4df9c2ae0029
Swarm Source
bzzr://cf9d08887638f188812f5e495964ecc113a60b2e5245138e39a5cd8e4df9c2ae
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,822.44 | 0.000001 | $0.003822 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.