zellic-audit
Initial commit
f998fcd
raw
history blame
711 Bytes
// This contract is part of Zellic’s smart contract dataset, which is a collection of publicly available contract code gathered as of March 2023.
pragma solidity >=0.8.7;
contract FrontRunMePls {
event success();
event fail();
bytes32 public secretHash;
constructor(bytes32 _secretHash) public payable{
secretHash = _secretHash;
}
function withdrawAllPlss(string calldata _secret) external{
if(keccak256(abi.encodePacked(_secret)) == secretHash) {
uint256 _myBalance = address(this).balance;
payable(msg.sender).transfer(_myBalance);
emit success();
}else{
emit fail();
}
}
}