DigixDAO owner + admin-ACL config registry (typed key/value store). CALLCODEs a Directory library clone for its admin set. Anthony Eufemio, Jan 2016.
Key Facts
Description
DigixConfiguration is DigixDAO's owner-controlled configuration registry: an admin ACL plus three typed key→value stores (bytes32→address, bytes32→uint256, bytes32→bytes32) with SetOwner / AddConfigEntry{A,I,B} / Register+UnregisterAdmin events. The admin set is held in a Directory.AddressBoolMap and manipulated by CALLCODE into a linked Directory library clone (this instance links 0x236e8216991843c32b6ef7036f1765366670369a). Deployed by Anthony Eufemio (Digix CTO, GitHub tymat) in Jan 2016 — one of 9 instances, each paired to its own Directory clone. Verified as an exact byte-for-byte 1290-byte runtime match; the reconstructed Jan-2016 source differs from the committed ethereum-ruby revision by an added configbytes map (+AddConfigEntryB), removed dead locals, and mixed bool/void return signatures.
Source Verified
Exact bytecode match. Runtime: 1290 bytes (byte-for-byte). Compiled with native solc v0.1.7 @commit c806b9bc, optimizer ON, --optimize-runs 1. The __Directory__ link placeholder is substituted with the paired library clone 0x236e8216991843c32b6ef7036f1765366670369a. Reconstructed Jan-2016 DigixConfiguration revision (adds configbytes map + AddConfigEntryB event; mixed bool/void returns). Deployer: Anthony Eufemio (DigixDAO).
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
// DigixDAO `DigixConfiguration` — owner + admin-ACL typed key/value config registry.
// Deployed by Anthony Eufemio (DigixDAO CTO, github.com/tymat), Jan 2016.
// Uses the `Directory` library (CALLCODE) for its admin set; this instance links Directory clone 0x236e8216991843c32b6ef7036f1765366670369a.
// Source: reconstructed Jan-2016 revision of github.com/DigixGlobal/ethereum-ruby DigixConfiguration.sol
// (adds a configbytes map + AddConfigEntryB event; mixed returns(bool)/void; no dead _oldaddress reads).
// Compiler: native solc v0.1.7 @commit c806b9bc, flags --optimize --optimize-runs 1.
// Verification: exact_bytecode_match (runtime 1290 bytes, byte-for-byte).
// Proof: https://github.com/cartoonitunes/awesome-ethereum-proofs/tree/main/proofs/digixdao-directory-config
library Directory {
struct AddressBytesMap { mapping(address => bytes32) bytesentries; }
struct AddressAddressMap { mapping(address => address) addrentries; }
struct AddressBoolMap { mapping(address => bool) boolentries; }
function insert(AddressBytesMap storage self, address key, bytes32 val) returns (bool) {
if (self.bytesentries[key] == val) return false;
self.bytesentries[key] = val;
return true;
}
function insert(AddressBoolMap storage self, address key) returns (bool) {
if (self.boolentries[key]) return false;
self.boolentries[key] = true;
return true;
}
function insert(AddressAddressMap storage self, address key, address val) returns (bool) {
if (self.addrentries[key] == val) return false;
self.addrentries[key] = val;
return true;
}
function remove(AddressBytesMap storage self, address key) returns (bool) {
if (self.bytesentries[key] == 0x0) return false;
self.bytesentries[key] = 0x0;
return true;
}
function remove(AddressBoolMap storage self, address key) returns (bool) {
if (!self.boolentries[key]) return false;
self.boolentries[key] = false;
return true;
}
function remove(AddressAddressMap storage self, address key) returns (bool) {
if (self.addrentries[key] == 0x0000000000000000000000000000000000000000) return false;
self.addrentries[key] = 0x0000000000000000000000000000000000000000;
return true;
}
function contains(AddressBytesMap storage self, address key) returns (bool) {
if (self.bytesentries[key] != 0x0) return true;
}
function contains(AddressBoolMap storage self, address key) returns (bool) {
return self.boolentries[key];
}
function contains(AddressAddressMap storage self, address key) returns (bool) {
if (self.addrentries[key] != 0x0000000000000000000000000000000000000000) return true;
}
function containsAndMatches(AddressBytesMap storage self, address key, bytes32 val) returns (bool) {
return (self.bytesentries[key] == val);
}
function containsAndMatches(AddressAddressMap storage self, address key, address val) returns (bool) {
return (self.addrentries[key] == val);
}
}
contract DigixConfiguration {
address owner;
Directory.AddressBoolMap admins;
mapping (bytes32 => address) configaddr;
mapping (bytes32 => uint256) configint;
mapping (bytes32 => bytes32) configbytes;
event SetOwner(address indexed owner, address indexed by);
event AddConfigEntryA(bytes32 indexed key, address indexed val, address indexed by);
event AddConfigEntryI(bytes32 indexed key, uint256 indexed val, address indexed by);
event AddConfigEntryB(bytes32 indexed key, bytes32 indexed val, address indexed by);
event RegisterAdmin(address indexed account, address indexed by);
event UnregisterAdmin(address indexed account, address indexed by);
function DigixConfiguration() {
owner = msg.sender;
}
modifier ifowner { if(msg.sender == owner) _ }
modifier ifadmin { if((msg.sender == owner) || isAdmin(msg.sender)) _ }
function getOwner() public constant returns (address) {
return owner;
}
function setOwner(address _newowner) ifowner {
owner = _newowner;
SetOwner(_newowner, msg.sender);
}
function addConfigEntryAddr(bytes32 _key, address _val) ifowner returns (bool) {
configaddr[_key] = _val;
AddConfigEntryA(_key, _val, msg.sender);
return true;
}
function getConfigEntryAddr(bytes32 _key) public constant returns (address) {
return configaddr[_key];
}
function addConfigEntryInt(bytes32 _key, uint256 _val) ifowner returns (bool) {
configint[_key] = _val;
AddConfigEntryI(_key, _val, msg.sender);
return true;
}
function getConfigEntryInt(bytes32 _key) public constant returns (uint256) {
return configint[_key];
}
function addConfigEntryBytes(bytes32 _key, bytes32 _val) ifowner returns (bool) {
configbytes[_key] = _val;
AddConfigEntryB(_key, _val, msg.sender);
return true;
}
function getConfigEntryBytes(bytes32 _key) public constant returns (bytes32) {
return configbytes[_key];
}
function registerAdmin(address _acct) ifowner returns (bool) {
if (!Directory.insert(admins, _acct))
throw;
RegisterAdmin(_acct, msg.sender);
return true;
}
function unregisterAdmin(address _acct) ifowner {
if (!Directory.remove(admins, _acct))
throw;
UnregisterAdmin(_acct, msg.sender);
}
function isAdmin(address _acct) public returns (bool) {
return Directory.contains(admins, _acct);
}
}External Links
Related contracts
Directory
Same deployerDigixDAO typed-collection storage library (Address to bytes/address/bool maps; insert/remove/contains). Anthony Eufemio, Nov 2015. 1 of 9 clones.
0xbce3b5...64bac0January 9, 2016Ledger Storage
Same deployerDigixDAO marketplace ledger storage: maps (uint256 id, address) to records of amount, timestamp and state. Anthony Eufemio, Jan 2016. 7 identical clones.
0x35e1d3...7c2e6dJanuary 9, 2016DigixConfiguration
Same deployerDigixDAO owner + admin-ACL config registry (typed key/value store). CALLCODEs a Directory library clone for its admin set. Anthony Eufemio, Jan 2016.
0xc0a2b0...dfbf56January 9, 2016Directory
Same deployerDigixDAO typed-collection storage library (Address to bytes/address/bool maps; insert/remove/contains). Anthony Eufemio, Nov 2015. 1 of 9 clones.
0x6fb339...164bd9January 9, 2016Ledger Storage
Same deployerDigixDAO marketplace ledger storage: maps (uint256 id, address) to records of amount, timestamp and state. Anthony Eufemio, Jan 2016. 7 identical clones.
0x4c8e1e...92b8d9January 9, 2016DigixConfiguration
Same deployerDigixDAO owner + admin-ACL config registry (typed key/value store). CALLCODEs a Directory library clone for its admin set. Anthony Eufemio, Jan 2016.
0x2f7764...ff9d6cJanuary 9, 2016