Verified contractPartial
Obama
Address0x7e6272ea50b57da046a37be99c0cedbc14dade24
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.1.6
- Same code
5 more contracts
Details
- Compiler
- solc 0.1.6+commit.d41f8b7c
- Language
- solidity
- Optimization
- No
- License
- Not stated
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 422,619
- Creation transaction
- 0xaa7f63d54b…2eb1335623
Obama.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract OraclizeI {
function query(uint timestamp, string datasource, string arg) returns (bytes32 id);
}
contract Obama {
uint public checks = 0;
function Obama() {
OraclizeI oraclize = OraclizeI(0xd4cb3eb955e03ac64644678fd3d6a7f3104ee70d);
oraclize.query(0, "WolframAlpha", "president of the United States");
}
function() {
if (msg.sender == address(0x26588a9301b0428d95e6fc3a5024fce8bec12d51)) callback();
}
function indexOf(string _haystack, string _needle) returns (int)
{
bytes memory h = bytes(_haystack);
bytes memory n = bytes(_needle);
if(h.length < 1 || n.length < 1 || (n.length > h.length))
return -1;
else if(h.length > (2**128 -1))
return -1;
else
{
uint subindex = 0;
for (uint i = 0; i < h.length; i ++)
{
if (h[i] == n[0])
{
subindex = 1;
while(subindex < n.length && (i + subindex) < h.length && h[i + subindex] == n[subindex])
{
subindex++;
}
if(subindex == n.length)
return int(i);
}
}
return -1;
}
}
function callback() {
if (indexOf(string(msg.data), "Obama") == -1) suicide(address(0x0047a8033cc6d6ca2ed5044674fd421f44884de8));
checks += 1;
OraclizeI oraclize = OraclizeI(0xd4cb3eb955e03ac64644678fd3d6a7f3104ee70d);
oraclize.query(0, "WolframAlpha", "president of the United States");
}
function kill() {
if (msg.sender == address(0x0047a8033cc6d6ca2ed5044674fd421f44884de8)) suicide(address(0x0047a8033cc6d6ca2ed5044674fd421f44884de8));
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": false
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.