Verified contractPartial
Outcome
Address0xd5f5120d1fdfda5ef60fca1f81d709f0432738af
- Balance
0 ETH
- Transactions
3
- Compiler
solc 0.1.3
- Same code
Only this contract
Details
- Compiler
- solc 0.1.3+commit.028f561d
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 136,950
- Creation transaction
- 0x11bd2acefd…bce1100cb7
Outcome.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Outcome {
uint x;
address public oracle1;
address public oracle2;
address public oracle3;
address public owner;
uint32 public value1;
uint32 public value2;
uint32 public value3;
uint16 public value;
function Outcome() {
oracle1 = msg.sender;
oracle2 = msg.sender;
oracle3 = msg.sender;
owner = msg.sender;
}
function changeOwner(uint8 n, address a) {
if (n == 1 && msg.sender == oracle1) oracle1 = a;
if (n == 2 && msg.sender == oracle2) oracle2 = a;
if (n == 3 && msg.sender == oracle3) oracle3 = a;
}
function setWinningOutcome(uint32 v) {
if (msg.sender == oracle1 && value1 == 0) value1 = v;
if (msg.sender == oracle2 && value2 == 0) value2 = v;
if (msg.sender == oracle3 && value3 == 0) value3 = v;
}
function hardSet(uint16 v) {
if (now > 1446336000) value = v;
}
function getWinningOutcome(uint outcome) returns (uint16 r) {
uint w;
if (value1 == value2 && value1 != 0) w = value1;
if (value3 == value2 && value2 != 0) w = value3;
if (value3 == value1 && value1 != 0) w = value1;
if (w != r) { if (w > 20000000) return 10001; return uint16(w * 10000 / 20000000 + 1); } else r = value;
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.