Last active
April 11, 2018 07:19
-
-
Save dan-turner/0325b9ddf425228752d279636d4e7911 to your computer and use it in GitHub Desktop.
Chain with pre-deployed registry
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "DevelopmentChain", | |
"engine": { | |
"instantSeal": null | |
}, | |
"params": { | |
"gasLimitBoundDivisor": "0x0400", | |
"accountStartNonce": "0x0", | |
"maximumExtraDataSize": "0x20", | |
"minGasLimit": "0x1388", | |
"networkID" : "0x11" | |
}, | |
"genesis": { | |
"seal": { | |
"generic": "0x0" | |
}, | |
"difficulty": "0x20000", | |
"author": "0x0000000000000000000000000000000000000000", | |
"timestamp": "0x00", | |
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | |
"extraData": "0x", | |
"gasLimit": "0x5B8D80" | |
}, | |
"accounts": { | |
"0x0000000000000000000000000000000000000001": { "balance": "1", "builtin": { "name": "ecrecover", "pricing": { "linear": { "base": 3000, "word": 0 } } } }, | |
"0x0000000000000000000000000000000000000002": { "balance": "1", "builtin": { "name": "sha256", "pricing": { "linear": { "base": 60, "word": 12 } } } }, | |
"0x0000000000000000000000000000000000000003": { "balance": "1", "builtin": { "name": "ripemd160", "pricing": { "linear": { "base": 600, "word": 120 } } } }, | |
"0x0000000000000000000000000000000000000004": { "balance": "1", "builtin": { "name": "identity", "pricing": { "linear": { "base": 15, "word": 3 } } } }, | |
"0x0000000000000000000000000000000000000084": { "constructor": "0x6060604052341561000f57600080fd5b60405160208061031683398101604052808051906020019091905050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061029b8061007b6000396000f300606060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b1461005c578063ba44593c146100b1578063ec56a373146100f7575b600080fd5b341561006757600080fd5b61006f61015e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100bc57600080fd5b6100f560048080356000191690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610183565b005b341561010257600080fd5b61011c60048080356000191690602001909190505061023c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156101de57600080fd5b8060016000846000191660001916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058200c62f3b30ca37b1fcbf226721c430a3a68e36c999283ffb10812ee195c697267002900000000000000000000000000a329c0648769a73afac7f9381e08fb43dbea72" }, | |
"0x00a329c0648769a73afac7f9381e08fb43dbea72": { "balance": "1606938044258990275541962092341162602522202993782792835301376" } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.21; | |
contract ContractRegistry { | |
address public owner; | |
mapping (bytes32 => address) public contracts; | |
function ContractRegistry(address _owner) public { | |
owner = _owner; | |
} | |
function set(bytes32 node, address instance) mustOwn public { | |
contracts[node] = instance; | |
} | |
modifier mustOwn { | |
require(msg.sender == owner); | |
_; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment