Back to HomePart of The Piper Merriam CollectionDeployer Piper Merriam(0xd3cda9...293601) Deployment Block 2,555,164 Deployment Date Nov 2, 2016, 09:44 PM Code Size 4.3 KB
Contract 0xee2157c15a43...9c8d8e2c4d3a
Deployed November 2, 2016 (9 years ago)Block 2,555,164
This contract is not yet documented
Know something about this contract? Switch to the History tab and suggest an edit to help preserve Ethereum history.
Tangerine Whistle EraVerified Source
Key Facts
Transactions by Year
20165
Tangerine Whistle Era
Emergency fork to address DoS attacks. Repriced IO-heavy opcodes.
Block span: 2,463,000 — 2,674,999
October 18, 2016 — November 22, 2016
Bytecode Overview
Opcodes4,365
Unique Opcodes146
Jump Instructions156
Storage Operations35
Verified Source Available
This contract has verified source code on Etherscan.
Show source code (Solidity)
{
"language": "Solidity",
"sources": {
"Registrar.sol": {
"content": "pragma solidity ^0.4.0;\r\n\r\n\r\ncontract Registrar {\r\n address public owner;\r\n\r\n function Registrar() {\r\n owner = msg.sender;\r\n }\r\n\r\n modifier onlyowner { if (msg.sender != owner) throw; _; }\r\n\r\n function transferOwner(address newOwner) public onlyowner {\r\n owner = newOwner;\r\n }\r\n\r\n Registrar public parent;\r\n\r\n function setParent(address parentAddress) public onlyowner {\r\n parent = Registrar(parentAddress);\r\n }\r\n\r\n mapping (bytes32 => bytes32) records;\r\n mapping (bytes32 => string) stringRecords;\r\n mapping (bytes32 => bool) recordExists;\r\n\r\n\r\n function set(string key, bytes32 value) public onlyowner {\r\n // Compute the fixed length key\r\n bytes32 _key = sha3(key);\r\n\r\n // Set the value\r\n records[_key] = value;\r\n recordExists[_key] = true;\r\n }\r\n\r\n function get(string key) constant returns (bytes32) {\r\n // Compute the fixed length key\r\n bytes32 _key = sha3(key);\r\n\r\n if (!recordExists[_key]) {\r\n if (address(parent) == 0x0) {\r\n // Do return unset keys\r\n throw;\r\n } else {\r\n // Delegate to the parent.\r\n return parent.get(key);\r\n }\r\n }\r\n\r\n return records[_key];\r\n }\r\n\r\n function exists(string key) constant returns (bool) {\r\n // Compute the fixed length key\r\n bytes32 _key = sha3(key);\r\n\r\n return recordExists[_key];\r\n }\r\n\r\n function setAddress(string key, address value) public onlyowner {\r\n set(key, bytes32(value));\r\n }\r\n\r\n function getAddress(string key) constant returns (address) {\r\n return address(get(key));\r\n }\r\n\r\n function setUInt(string key, uint value) public onlyowner {\r\n set(key, bytes32(value));\r\n }\r\n\r\n function getUInt(string key) constant returns (uint) {\r\n return uint(get(key));\r\n }\r\n\r\n function setInt(string key, int value) public onlyowner {\r\n set(key, bytes32(value));\r\n }\r\n\r\n function getInt(string key) constant returns (int) {\r\n return int(get(key));\r\n }\r\n\r\n function setBool(string key, bool value) public onlyowner {\r\n if (value) {\r\n set(key, bytes32(0x1));\r\n } else {\r\n set(key, bytes32(0x0));\r\n }\r\n }\r\n\r\n function getBool(string key) constant returns (bool) {\r\n return get(key) != bytes32(0x0);\r\n }\r\n\r\n function setString(string key, string value) public onlyowner {\r\n bytes32 valueHash = sha3(value);\r\n set(key, valueHash);\r\n stringRecords[valueHash] = value;\r\n }\r\n\r\n function getString(string key) public returns (string) {\r\n bytes32 valueHash = get(key);\r\n return stringRecords[valueHash];\r\n }\r\n}"
}
},
"settings": {
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
},
"compilationTarget": {
"Registrar.sol": "Registrar"
}
}
}