ETH Price: $3,823.84 (+5.82%)

Contract

0x3C3F481950FA627bb9f39A04bCCdc88f4130795b
 

Overview

ETH Balance

0.000001 ETH

Eth Value

Less Than $0.01 (@ $3,823.84/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Bet58194642018-06-19 23:47:182367 days ago1529452038IN
0x3C3F4819...f4130795b
1.000001 ETH0.000023851.1
Own58194182018-06-19 23:36:392367 days ago1529451399IN
0x3C3F4819...f4130795b
0 ETH0.000025861.1

Latest 2 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
66187982018-10-31 17:28:222233 days ago1541006902
0x3C3F4819...f4130795b
2 ETH
59325022018-07-09 10:00:492347 days ago1531130449
0x3C3F4819...f4130795b
1 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EtherBet

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *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

Contract ABI

[{"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"}]

608060405260008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060146101000a81548160ff02191690831515021790555034801561006b57600080fd5b506104bd8061007b6000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806311610c25146100825780634d68282f1461008c5780635ec01e4d146100b9578063a69df4b5146100ea578063f349e3e314610101578063f83d08ba14610144575b61008061015b565b005b61008a61015b565b005b34801561009857600080fd5b506100b7600480360381019080803590602001909291905050506101eb565b005b3480156100c557600080fd5b506100ce610285565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100f657600080fd5b506100ff6102bb565b005b34801561010d57600080fd5b50610142600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061032d565b005b34801561015057600080fd5b5061015961041e565b005b60016002610167610285565b60ff1681151561017357fe5b0660ff1614801561018b5750670de0b6b3a764000034145b80156101a45750600060149054906101000a900460ff16155b156101e9573373ffffffffffffffffffffffffffffffffffffffff16671bc16d674ec8000060405160006040518083038185875af19250505015156101e857600080fd5b5b565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610282573373ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000820260405160006040518083038185875af192505050151561028157600080fd5b5b50565b6000610100424460405180838152602001828152602001925050506040518091039020600190048115156102b557fe5b06905090565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561032b5760008060146101000a81548160ff0219169083151502179055505b565b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806103d557503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1561041b57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561048f576001600060146101000a81548160ff0219169083151502179055505b5600a165627a7a72305820cf9d08887638f188812f5e495964ecc113a60b2e5245138e39a5cd8e4df9c2ae0029

Deployed Bytecode

0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806311610c25146100825780634d68282f1461008c5780635ec01e4d146100b9578063a69df4b5146100ea578063f349e3e314610101578063f83d08ba14610144575b61008061015b565b005b61008a61015b565b005b34801561009857600080fd5b506100b7600480360381019080803590602001909291905050506101eb565b005b3480156100c557600080fd5b506100ce610285565b604051808260ff1660ff16815260200191505060405180910390f35b3480156100f657600080fd5b506100ff6102bb565b005b34801561010d57600080fd5b50610142600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061032d565b005b34801561015057600080fd5b5061015961041e565b005b60016002610167610285565b60ff1681151561017357fe5b0660ff1614801561018b5750670de0b6b3a764000034145b80156101a45750600060149054906101000a900460ff16155b156101e9573373ffffffffffffffffffffffffffffffffffffffff16671bc16d674ec8000060405160006040518083038185875af19250505015156101e857600080fd5b5b565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610282573373ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000820260405160006040518083038185875af192505050151561028157600080fd5b5b50565b6000610100424460405180838152602001828152602001925050506040518091039020600190048115156102b557fe5b06905090565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561032b5760008060146101000a81548160ff0219169083151502179055505b565b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806103d557503373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1561041b57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b3373ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141561048f576001600060146101000a81548160ff0219169083151502179055505b5600a165627a7a72305820cf9d08887638f188812f5e495964ecc113a60b2e5245138e39a5cd8e4df9c2ae0029

Swarm Source

bzzr://cf9d08887638f188812f5e495964ecc113a60b2e5245138e39a5cd8e4df9c2ae

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.