The shared base every Digix gold contract inherits, holding the config pointer and the owner
Historical Significance
The indirection layer that let a multi contract system be upgraded a component at a time in January 2016, when redeploying meant losing every address your other contracts held.
Context
Deployed in the Frontier era, five days before the first ERC-20 token, by the team that issued it.
Key Facts
Description
GenericInterface is the piece the whole Digix gold system is built on. It stores the address of the DigixConfiguration contract and an owner, and turns config keys into live addresses so the rest of the system can ask for the gold registry, the vendor, custodian and auditor registries, the token ledger and the marketplace by name rather than by hardcoded address. Every other contract in the system inherits it. Deployed on 9 January 2016 by 0x4f53269e422711d4725f7381444c7f66f7d05788, the account that deployed the whole gold system that day, and reproduced byte for byte, constructor included, with solc v0.1.7 at one optimizer run.
Source Verified
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)
contract DigixConfiguration {
function getConfigEntryAddr(bytes32 _key) public constant returns (address) {}
function getConfigEntryInt(bytes32 _key) public constant returns (uint256) {}
function isAdmin(address _acct) public returns (bool) {}
function getConfigEntryBytes(bytes32 _key) public constant returns (bytes32) {}
}
contract VendorRegistry {
function isVendor(address _vndr) public returns (bool) {}
}
contract CustodianRegistry {
function isCustodian(address _cust) public returns (bool) {}
}
contract AuditorRegistry {
function isAuditor(address _adtr) public returns (bool) {}
}
contract GenericInterface {
address public config;
address public owner;
function GenericInterface(address _config) {
owner = msg.sender;
config = _config;
}
function getConfigAddress() public returns (address) {
return config;
}
function getOwner() public returns (address) {
return owner;
}
function setOwner(address _newowner) ifowner {
owner = _newowner;
}
function isAdmin(address _acct) public returns (bool) {
return DigixConfiguration(config).isAdmin(_acct);
}
function goldRegistry() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("registry/gold");
}
function vendorRegistry() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("registry/vendor");
}
function custodianRegistry() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("registry/custodian");
}
function auditorRegistry() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("registry/auditor");
}
function goldTokenLedger() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("ledger/token");
}
function recastContract() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("contract/recast");
}
function minterContract() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("contract/minter");
}
function txFeeWallet() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("wallet/txfee");
}
function accountingWallet() public returns (address) {
return DigixConfiguration(config).getConfigEntryAddr("wallet/accounting");
}
function redemptionFee() public returns (uint256) {
return DigixConfiguration(config).getConfigEntryInt("settings/redemptionfee");
}
function recastFee() public returns (uint256) {
return DigixConfiguration(config).getConfigEntryInt("settings/recastfee");
}
function txFee() public returns (uint256) {
return DigixConfiguration(config).getConfigEntryInt("settings/txfee");
}
function txFeeMax() public returns (uint256) {
return DigixConfiguration(config).getConfigEntryInt("settings/txfeemax");
}
function storageRate() public returns (uint256) {
return DigixConfiguration(config).getConfigEntryInt("settings/rate");
}
function getBase() public returns (uint256) {
return DigixConfiguration(config).getConfigEntryInt("settings/base");
}
function billingPeriod() public returns (uint256) {
return DigixConfiguration(config).getConfigEntryInt("settings/billingperiod");
}
function requiredConfirmations() public returns (uint256) {
return DigixConfiguration(config).getConfigEntryInt("settings/confirmations");
}
function nonMintSku() public returns (uint256) {
return uint256(DigixConfiguration(config).getConfigEntryBytes("settings/nonmintsku"));
}
function isGoldRegistry(address _greg) public returns (bool) {
return (goldRegistry() == _greg);
}
function isCustodian(address _cust) public returns (bool) {
return CustodianRegistry(custodianRegistry()).isCustodian(_cust);
}
function isAuditor(address _adtr) public returns (bool) {
return AuditorRegistry(auditorRegistry()).isAuditor(_adtr);
}
function isVendor(address _vndr) public returns (bool) {
return VendorRegistry(vendorRegistry()).isVendor(_vndr);
}
modifier ifvendor { if(isVendor(msg.sender)) _ }
modifier ifowner { if(msg.sender == owner) _ }
modifier ifcustodian { if(isCustodian(msg.sender)) _ }
modifier ifauditor { if(isAuditor(msg.sender)) _ }
modifier ifgoldregistry { if(isGoldRegistry(msg.sender)) _ }
}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