Verified contractPartial
Bounty
Address0x7d5e2f539f3eabbe57d058d7675d991993dfe206
- Balance
0 ETH
- Transactions
3
- Compiler
solc 0.5.6
- Same code
Only this contract
Details
- Compiler
- solc 0.5.6+commit.b259423e
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 7,368,362
- Creation transaction
- 0xcbe759df4c…ed9a49482c
Bounty.sol
pragma solidity >=0.4.22 <0.6.0;
contract Bounty {
uint public counter = 0;
uint public currentNumber = 1;
string internal base64this;
mapping(address => bool) internal winners;
constructor(string memory _base64) public {
base64this = _base64;
}
function claim(uint guessCurrentNumber, uint setNextNumber) public {
require(counter < 10, "All prizes collected");
require(winners[msg.sender] == false, "Cannot participate twice. But feel free to sybil us");
require(currentNumber == guessCurrentNumber);
currentNumber = setNextNumber;
counter += 1;
winners[msg.sender] = true;
}
function getPrize() public view returns (string memory){
require(winners[msg.sender]);
return base64this;
}
function isWinner(address _address) public view returns(bool){
return winners[_address];
}
}Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.