ETH Price: $3,422.39 (+0.24%)
Gas: 48 Gwei

Contract

0x13c547Ff0888A0A876E6F1304eaeFE9E6E06FC4B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Revoce52945812018-03-21 10:10:392174 days ago1521627039IN
0x13c547Ff...E6E06FC4B
0 ETH0.000109185
Set Pass52945712018-03-21 10:07:272174 days ago1521626847IN
0x13c547Ff...E6E06FC4B
1 ETH0.000095484
Get Gift50938752018-02-15 9:19:462208 days ago1518686386IN
0x13c547Ff...E6E06FC4B
0 ETH0.0004932820
Set Pass50915062018-02-14 23:49:202208 days ago1518652160IN
0x13c547Ff...E6E06FC4B
1 ETH0.000006030.25
0x6060604050914122018-02-14 23:27:442208 days ago1518650864IN
 Create: NEW_YEARS_GIFT
0 ETH0.000131050.23

Latest 3 internal transactions

Advanced mode:
Parent Txn Hash Block From To Value
52946522018-03-21 10:26:302174 days ago1521627990
0x13c547Ff...E6E06FC4B
2 ETH
51012932018-02-16 14:59:172206 days ago1518793157
0x13c547Ff...E6E06FC4B
1.01 ETH
50919902018-02-15 1:54:062208 days ago1518659646
0x13c547Ff...E6E06FC4B
1 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NEW_YEARS_GIFT

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-02-14
*/

pragma solidity ^0.4.19;

contract NEW_YEARS_GIFT
{
    string message;
    
    bool passHasBeenSet = false;
    
    address sender;
    
    bytes32 public hashPass;
	
	function() public payable{}
    
    function GetHash(bytes pass) public constant returns (bytes32) {return sha3(pass);}
    
    function SetPass(bytes32 hash)
    public
    payable
    {
        if( (!passHasBeenSet&&(msg.value > 1 ether)) || hashPass==0x0 )
        {
            hashPass = hash;
            sender = msg.sender;
        }
    }
    
    function SetMessage(string _message)
    public
    {
        if(msg.sender==sender)
        {
            message =_message;
        }
    }
    
    function GetGift(bytes pass)
    external
    payable
    returns (string)
    {
        if(hashPass == sha3(pass))
        {
            msg.sender.transfer(this.balance);
            return message;
        }
    }
    
    function Revoce()
    public
    payable
    {
        if(msg.sender==sender)
        {
            sender.transfer(this.balance);
            message="";
        }
    }
    
    function PassHasBeenSet(bytes32 hash)
    public
    {
        if(msg.sender==sender&&hash==hashPass)
        {
           passHasBeenSet=true;
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"hash","type":"bytes32"}],"name":"SetPass","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"pass","type":"bytes"}],"name":"GetGift","outputs":[{"name":"","type":"string"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":false,"inputs":[{"name":"hash","type":"bytes32"}],"name":"PassHasBeenSet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"hashPass","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_message","type":"string"}],"name":"SetMessage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"pass","type":"bytes"}],"name":"GetHash","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"Revoce","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"payable":true,"stateMutability":"payable","type":"fallback"}]

60606040526000600160006101000a81548160ff021916908315150217905550341561002a57600080fd5b61077d806100396000396000f300606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a6fbb0514610085578063181ffc5f146100a157806331fd725a1461013d57806387f244841461016457806388fabb3a14610195578063b456ecc5146101f2578063cd8b02c81461026b575b005b61009f600480803560001916906020019091905050610275565b005b6100c260048080359060200190820180359060200191909192905050610301565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101025780820151818401526020810190506100e7565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014857600080fd5b610162600480803560001916906020019091905050610437565b005b341561016f57600080fd5b6101776104bf565b60405180826000191660001916815260200191505060405180910390f35b34156101a057600080fd5b6101f0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506104c5565b005b34156101fd57600080fd5b61024d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610535565b60405180826000191660001916815260200191505060405180910390f35b6102736105a1565b005b600160009054906101000a900460ff161580156102995750670de0b6b3a764000034115b806102ad5750600060010260025460001916145b156102fe578060028160001916905550336001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b610309610698565b828260405180838380828437820191505092505050604051809103902060001916600254600019161415610430573373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561038e57600080fd5b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104245780601f106103f957610100808354040283529160200191610424565b820191906000526020600020905b81548152906001019060200180831161040757829003601f168201915b50505050509050610431565b5b92915050565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561049c5750600254600019168160001916145b156104bc5760018060006101000a81548160ff0219169083151502179055505b50565b60025481565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156105325780600090805190602001906105309291906106ac565b505b50565b6000816040518082805190602001908083835b60208310151561056d5780518252602082019150602081019050602083039250610548565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050919050565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610696576001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561066e57600080fd5b6020604051908101604052806000815250600090805190602001906106949291906106ac565b505b565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106106ed57805160ff191683800117855561071b565b8280016001018555821561071b579182015b8281111561071a5782518255916020019190600101906106ff565b5b509050610728919061072c565b5090565b61074e91905b8082111561074a576000816000905550600101610732565b5090565b905600a165627a7a72305820f9e75b571e5cc844db19a8ec40c13e1e017e53b41886adf61ea367f67e7ca4ae0029

Deployed Bytecode

0x606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a6fbb0514610085578063181ffc5f146100a157806331fd725a1461013d57806387f244841461016457806388fabb3a14610195578063b456ecc5146101f2578063cd8b02c81461026b575b005b61009f600480803560001916906020019091905050610275565b005b6100c260048080359060200190820180359060200191909192905050610301565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101025780820151818401526020810190506100e7565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014857600080fd5b610162600480803560001916906020019091905050610437565b005b341561016f57600080fd5b6101776104bf565b60405180826000191660001916815260200191505060405180910390f35b34156101a057600080fd5b6101f0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506104c5565b005b34156101fd57600080fd5b61024d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610535565b60405180826000191660001916815260200191505060405180910390f35b6102736105a1565b005b600160009054906101000a900460ff161580156102995750670de0b6b3a764000034115b806102ad5750600060010260025460001916145b156102fe578060028160001916905550336001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b610309610698565b828260405180838380828437820191505092505050604051809103902060001916600254600019161415610430573373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561038e57600080fd5b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104245780601f106103f957610100808354040283529160200191610424565b820191906000526020600020905b81548152906001019060200180831161040757829003601f168201915b50505050509050610431565b5b92915050565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561049c5750600254600019168160001916145b156104bc5760018060006101000a81548160ff0219169083151502179055505b50565b60025481565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156105325780600090805190602001906105309291906106ac565b505b50565b6000816040518082805190602001908083835b60208310151561056d5780518252602082019150602081019050602083039250610548565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050919050565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610696576001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561066e57600080fd5b6020604051908101604052806000815250600090805190602001906106949291906106ac565b505b565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106106ed57805160ff191683800117855561071b565b8280016001018555821561071b579182015b8281111561071a5782518255916020019190600101906106ff565b5b509050610728919061072c565b5090565b61074e91905b8082111561074a576000816000905550600101610732565b5090565b905600a165627a7a72305820f9e75b571e5cc844db19a8ec40c13e1e017e53b41886adf61ea367f67e7ca4ae0029

Swarm Source

bzzr://f9e75b571e5cc844db19a8ec40c13e1e017e53b41886adf61ea367f67e7ca4ae

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

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