mirror of https://github.com/ConsenSys/mythril
blockchainethereumsmart-contractssoliditysecurityprogram-analysissecurity-analysissymbolic-execution
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
583 B
28 lines
583 B
10 months ago
|
|
||
|
pragma solidity ^0.4.16;
|
||
|
|
||
|
contract EthTxOrderDependenceMinimal {
|
||
|
address public owner;
|
||
|
bool public claimed;
|
||
|
uint public reward;
|
||
|
|
||
|
function EthTxOrderDependenceMinimal() public {
|
||
|
owner = msg.sender;
|
||
|
}
|
||
|
|
||
|
function setReward() public payable {
|
||
|
require (!claimed);
|
||
|
|
||
|
require(msg.sender == owner);
|
||
|
owner.transfer(reward);
|
||
|
reward = msg.value;
|
||
|
}
|
||
|
|
||
|
function claimReward(uint256 submission) {
|
||
|
require (!claimed);
|
||
|
require(submission < 10);
|
||
|
|
||
|
msg.sender.transfer(reward);
|
||
|
claimed = true;
|
||
|
}
|
||
|
}
|