Created Mar 14 2017, last updated Aug 1 2017.
Address: 0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
//! A decentralised registry of 4-bytes signatures => method mappings //! By Parity Team (Ethcore), 2016. //! Released under the Apache Licence 2. pragma solidity ^0.4.1; contract Owned { modifier only_owner { if (msg.sender != owner) return; _; } event NewOwner(address indexed old, address indexed current); function setOwner(address _new) only_owner { NewOwner(owner, _new); owner = _new; } address public owner = msg.sender; } contract SignatureReg is Owned { // mapping of signatures to entries mapping (bytes4 => string) public entries; // the total count of registered signatures uint public totalSignatures = 0; // allow only new calls to go in modifier when_unregistered(bytes4 _signature) { if (bytes(entries[_signature]).length != 0) return; _; } // dispatched when a new signature is registered event Registered(address indexed creator, bytes4 indexed signature, string method); // constructor with self-registration function SignatureReg() { register('register(string)'); } // registers a method mapping function register(string _method) returns (bool) { return _register(bytes4(sha3(_method)), _method); } // internal register function, signature => method function _register(bytes4 _signature, string _method) internal when_unregistered(_signature) returns (bool) { entries[_signature] = _method; totalSignatures = totalSignatures + 1; Registered(msg.sender, _signature, _method); return true; } // in the case of any extra funds function drain() only_owner { if (!msg.sender.send(this.balance)) { throw; } } } |
And the ABI:
1 |
[{"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSignatures","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"drain","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes4"}],"name":"entries","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_method","type":"string"}],"name":"register","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":true,"name":"signature","type":"bytes4"},{"indexed":false,"name":"method","type":"string"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"NewOwner","type":"event"}] |
Using the following script:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
#!/bin/sh # Get Parity Signature Registry Data # # Enjoy. (c) BokkyPooBah, 2017. The MIT License. geth attach rpc:http://localhost:8545 << EOF var registryAddress = "0x44691B39d1a75dC4E0A0346CBB15E310e6ED1E86"; var registryABI = [{"constant":false,"inputs":[{"name":"_new","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSignatures","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"drain","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes4"}],"name":"entries","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_method","type":"string"}],"name":"register","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"creator","type":"address"},{"indexed":true,"name":"signature","type":"bytes4"},{"indexed":false,"name":"method","type":"string"}],"name":"Registered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"old","type":"address"},{"indexed":true,"name":"current","type":"address"}],"name":"NewOwner","type":"event"}]; var registryCreationBlock = 2468384; var registry = eth.contract(registryABI).at(registryAddress); var totalSignatures = registry.totalSignatures(); console.log("totalSignatures: " + totalSignatures); var registeredEvent = registry.Registered({}, { fromBlock: registryCreationBlock, toBlock: 'latest' }); var i = 0; registeredEvent.watch(function (error, result) { // console.log(i++ + ": " + JSON.stringify(result)); console.log(i++ + ": " + result.args.signature + " => " + result.args.method); }); EOF |
I get the following contents of the registry:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
totalSignatures: 189 0: 0xf2c298be => register(string) 1: 0x861731d5 => () 2: 0x095ea7b3 => approve(address,uint256) 3: 0x23b872dd => transferFrom(address,address,uint256) 4: 0xa9059cbb => transfer(address,uint256) 5: 0x13af4035 => setOwner(address) 6: 0x79ce9fac => transfer(bytes32,address) 7: 0xeadf9760 => setUint(bytes32,string,uint256) 8: 0x47448e8a => set(bytes32,string,bytes32) 9: 0xf6d339e4 => setAddress(bytes32,string,address) 10: 0x69fe0e2d => setFee(uint256) 11: 0x4f39ca59 => drop(bytes32) 12: 0xf25eb5c1 => removeReverse() 13: 0xac4e73f9 => proposeReverse(string,address) 14: 0x432ced04 => reserve(bytes32) 15: 0x3f3935d1 => confirmReverse(string) 16: 0x9890220b => drain() 17: 0x29cbdc86 => buyin(address,uint256) 18: 0x5af36e3e => refund(uint256,uint256) 19: 0xa02b161e => unregister(uint256) 20: 0x66b42dcb => register(address,string,uint256,string) 21: 0xdd93890b => setMeta(uint256,bytes32,bytes32) 22: 0x7b1a547c => registerAs(address,string,uint256,string,address) 23: 0x2196ae0d => hint(bytes32,string,bytes20) 24: 0x7c8c6643 => unhint(bytes32) 25: 0x02f2008d => hintURL(bytes32,string) 26: 0x1a0919dc => unregister(bytes32) 27: 0xc52bd836 => setDappOwner(bytes32,address) 28: 0x91cd242d => setMeta(bytes32,bytes32,bytes32) 29: 0xe1fa8e84 => register(bytes32) 30: 0x4a18695f => triggerPayOut(uint256) 31: 0xd0517bd3 => markSigned() 32: 0xb8b4f1a0 => signContract() 33: 0xb20d30a9 => setDailyLimit(uint256) 34: 0xb75c7dc6 => revoke(bytes32) 35: 0x5c52c2f5 => resetSpentToday() 36: 0x173825d9 => removeOwner(address) 37: 0xcbf0b0c0 => kill(address) 38: 0x2f54bf6e => isOwner(address) 39: 0xb61d27f6 => execute(address,uint256,bytes) 40: 0x797af627 => confirm(bytes32) 41: 0xba51a6df => changeRequirement(uint256) 42: 0xf00d4b5d => changeOwner(address,address) 43: 0x7065cb48 => addOwner(address) 44: 0xca5eb5e1 => setDelegate(address) 45: 0x74a8f103 => revoke(address) 46: 0x338cdca1 => request() 47: 0x3da5c3ce => puzzle(address,bytes32) 48: 0x14253887 => certify(address) 49: 0x26316e58 => setMigrationMaster(address) 50: 0x590e1ae3 => refund() 51: 0x75e2ff65 => setMigrationAgent(address) 52: 0x454b0608 => migrate(uint256) 53: 0xefc81a8c => create() 54: 0x4bb278f3 => finalize() 55: 0xcae9ca51 => approveAndCall(address,uint256,bytes) 56: 0xeb1ff845 => changeId(uint256,uint256,uint256) 57: 0x75090ebf => changeDomain(uint256,uint256,uint256,address) 58: 0x2ebec916 => withdrawalProfit() 59: 0xf2fde38b => transferOwnership(address) 60: 0x523aee69 => changeTokenContract(address) 61: 0x20145328 => changeMelonportAddress(address) 62: 0xdda44b10 => buyRecipient(address,uint8,bytes32,bytes32) 63: 0xd89397b1 => btcsBuyRecipient(address) 64: 0xe5fe4f31 => buy(uint8,bytes32,bytes32) 65: 0xcb3e64fd => unhalt() 66: 0x5ed7ca5b => halt() 67: 0x5de01497 => ownerWithdrawERC20Token(address,uint256) 68: 0x3d6a32bd => createTradeContract(address,uint256,uint256,uint256,bool,bool) 69: 0xc60ccb0e => takerBuyAsset() 70: 0xeff883bd => takerSellAsset(uint256) 71: 0x2170ebf7 => makerWithdrawEther(uint256) 72: 0xcd53a3b7 => makerWithdrawAsset(uint256) 73: 0xc34764cf => makerWithdrawERC20Token(address,uint256) 74: 0x919f8cfc => makerDepositEther() 75: 0x52954e5a => makerTransferAsset(address,uint256) 76: 0xa7abc124 => activate(bool,bool) 77: 0xbe86d5a7 => makerTransferEther(address,uint256) 78: 0xc5e412e5 => createSaleContract(address,uint256,uint256,bool) 79: 0xce5e84a3 => activate(bool) 80: 0x17be89f0 => createTradeContract(address,uint256,uint256,bool) 81: 0x8d92fdf3 => withdrawAsset(uint256) 82: 0x9e281a98 => withdrawToken(address,uint256) 83: 0x2e1a7d4d => withdraw(uint256) 84: 0xa6f2ae3a => buy() 85: 0xbca7a9e2 => lockToken() 86: 0x49606455 => take(bytes32,uint128) 87: 0x093f5198 => make(address,address,uint128,uint128) 88: 0xf09ea2a6 => offer(uint256,address,uint256,address) 89: 0xd6febde8 => buy(uint256,uint256) 90: 0x779997c3 => bump(bytes32) 91: 0x40e58ee5 => cancel(uint256) 92: 0xb4f9b6c8 => kill(bytes32) 93: 0xb4427263 => createTokens() 94: 0xa91ee0dc => setRegistry(address) 95: 0xb660f4c0 => setTargetDragoDAO(address,address) 96: 0xf08d29d5 => createDrago(string,string) 97: 0x74fc5df7 => changeDragoDAO(address) 98: 0x1c31f710 => setBeneficiary(address) 99: 0x0bc1f0d5 => changeGabcoinDAO(address) 100: 0xe96e7a7e => createGabcoin(string,string) 101: 0x05db8f74 => setTargetGabcoinDAO(address,address) 102: 0xbb60160e => setExchange(address,address) 103: 0xf3fef3a3 => withdraw(address,uint256) 104: 0x92a0006c => trade(address,uint256,address,uint256,uint256,address,uint256) 105: 0x808187e5 => finalize(address,uint24) 106: 0x5ae11d5d => order(address,uint256,address,uint256,uint256) 107: 0x279a7094 => orderCFD(address,bool,uint32,uint128) 108: 0xd19d5138 => setCfdMaxLeverage(address,uint24) 109: 0xa7154d22 => cancel(address,uint32) 110: 0x47e7ef24 => deposit(address,uint256) 111: 0x7879de90 => cancelOrder(address,uint256,address,uint256,uint256) 112: 0x0e5c8d41 => addCredits(address,uint256,address,uint256,uint24) 113: 0xc81d1d5b => getPunk(uint256) 114: 0xbed2af80 => getPunk() 115: 0x3ccfd60b => withdraw() 116: 0xf6eeff1e => punkNoLongerForSale(uint256) 117: 0x8b72a2ec => transferPunk(address,uint256) 118: 0x08573a0b => reservePunksForOwner(uint256) 119: 0x62a5af3b => freeze() 120: 0xe5225381 => collect() 121: 0xd1058e59 => claimAll() 122: 0x379607f5 => claim(uint256) 123: 0xc4d66de8 => initialize(address) 124: 0x7a9e5e4b => setAuthority(address) 125: 0xe0cb3aa0 => buyWithLimit(uint256,uint256) 126: 0x40cc8854 => bite(bytes32) 127: 0x080b6132 => chop(uint128) 128: 0xbdf6e771 => cuff(uint128) 129: 0xf5893bd0 => crop(uint128) 130: 0x56371435 => cork(uint128) 131: 0xcbd5accc => cage(uint128) 132: 0x295d3a54 => join(uint128) 133: 0x67c48dd6 => free(bytes32,uint128) 134: 0x9f678cca => drip() 135: 0x69855358 => exit(uint128) 136: 0xa22664ad => draw(bytes32,uint128) 137: 0xc92aecc4 => chi() 138: 0x51f91066 => tag() 139: 0xb84d2106 => shut(bytes32) 140: 0xfcfff16f => open() 141: 0x4b11982e => setCooldown(uint64) 142: 0x07c241aa => lock(bytes32,uint128) 143: 0xbaa8529c => give(bytes32,address) 144: 0x6299c83e => wipe(bytes32,uint128) 145: 0xde3e7a9c => boom(uint128) 146: 0x90089adf => bust(uint128) 147: 0x65d1df24 => s2s() 148: 0x420f2ed9 => jump(uint128) 149: 0xc8d10f40 => warp(uint64) 150: 0xca2201c5 => coax(uint128) 151: 0x495d32cb => par() 152: 0x0302c688 => prod() 153: 0x1406b921 => vent() 154: 0x961be391 => cash() 155: 0x69245009 => cage() 156: 0x44df8e70 => burn() 157: 0x90bc1693 => burn(uint128) 158: 0x7261e469 => burn(address,uint128) 159: 0xbe29184f => mint(address,uint128) 160: 0x8402181f => pull(address,uint128) 161: 0x69d3e20e => mint(uint128) 162: 0x12e5ff77 => exit(address,uint128) 163: 0x89afcb44 => burn(address) 164: 0x6b2113cd => pull(address,address,uint128) 165: 0xceae3abd => join(address,uint128) 166: 0x52d11238 => pull(address) 167: 0x66b3bcb0 => pull(address,address) 168: 0x3c71a7c7 => push(address,address,uint128) 169: 0x89b09de7 => push(address) 170: 0x03438dd0 => swap(address) 171: 0x3452f51d => push(address,uint128) 172: 0xb716ba67 => push(address,address) 173: 0xa57d9ad3 => lend(address,uint128) 174: 0x379f5217 => mend(address,uint128) 175: 0xe0cd1d69 => heal(address) 176: 0x065a50ed => pool(address,uint128) 177: 0x114e11a0 => take(address,uint128) 178: 0xbe9a6555 => start() 179: 0x5ac801fe => setName(bytes32) 180: 0x07da68f5 => stop() 181: 0x67aff484 => setUserRole(address,uint8,bool) 182: 0xd381ba7c => setRootUser(address,bool) 183: 0xc6b0263e => setPublicCapability(address,bytes4,bool) 184: 0x7d40583d => setRoleCapability(uint8,address,bytes4,bool) 185: 0xf0217ce5 => permit(bytes32,bytes32,bytes32) 186: 0xcbeea68c => permit(address,address,bytes32) 187: 0x79d88d87 => forbid(bytes32,bytes32,bytes32) 188: 0x2bc3217d => forbid(address,address,bytes32) |