UNPKG

tokenboost-solidity

Version:
812 lines (811 loc) 277 kB
{ "contractName": "Registry", "abi": [ { "constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "name": "_newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "name": "_opened", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" } ], "name": "OwnershipRenounced", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "name": "previousOwner", "type": "address" }, { "indexed": true, "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "constant": false, "inputs": [], "name": "open", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "name": "_identifier", "type": "string" }, { "name": "_version", "type": "uint256" }, { "name": "_template", "type": "address" } ], "name": "register", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": true, "inputs": [], "name": "numberOfIdentifiers", "outputs": [ { "name": "size", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_index", "type": "uint256" } ], "name": "identifierAt", "outputs": [ { "name": "identifier", "type": "string" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_identifier", "type": "string" } ], "name": "versionsOf", "outputs": [ { "name": "version", "type": "uint256[]" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_identifier", "type": "string" }, { "name": "_version", "type": "uint256" } ], "name": "templateOf", "outputs": [ { "name": "template", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "_identifier", "type": "string" } ], "name": "latestTemplateOf", "outputs": [ { "name": "template", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" } ], "bytecode": "0x608060405234801561001057600080fd5b50604051602080610e85833981016040525160008054911515740100000000000000000000000000000000000000000260a060020a60ff0219600160a060020a0319909316331792909216919091179055610e15806100706000396000f3006080604052600436106100a35763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663121a42c081146100a857806324d48c0d146101355780632a4798da1461015c5780632cf5cf8b146101d15780635147fba11461027a5780635dc1aad3146102d5578063715018a6146103415780638da5cb5b14610356578063f2fde38b1461036b578063fcfff16f1461038c575b600080fd5b3480156100b457600080fd5b506100c06004356103a1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fa5781810151838201526020016100e2565b50505050905090810190601f1680156101275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014157600080fd5b5061014a61044c565b60408051918252519081900360200190f35b34801561016857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101b59436949293602493928401919081908401838280828437509497506104539650505050505050565b60408051600160a060020a039092168252519081900360200190f35b3480156101dd57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261022a94369492936024939284019190819084018382808284375094975061055d9650505050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561026657818101518382015260200161024e565b505050509050019250505060405180910390f35b34801561028657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101b5943694929360249392840191908190840183828082843750949750509335945061060a9350505050565b3480156102e157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261033f9436949293602493928401919081908401838280828437509497505084359550505050602090910135600160a060020a03169050610687565b005b34801561034d57600080fd5b5061033f610be8565b34801561036257600080fd5b506101b5610c54565b34801561037757600080fd5b5061033f600160a060020a0360043516610c63565b34801561039857600080fd5b5061033f610c86565b60606001828154811015156103b257fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156104405780601f1061041557610100808354040283529160200191610440565b820191906000526020600020905b81548152906001019060200180831161042357829003601f168201915b50505050509050919050565b6001545b90565b6000806003836040518082805190602001908083835b602083106104885780518252601f199092019160209182019101610469565b51815160209384036101000a600019018019909216911617905292019485525060405193849003810184208751909550600494889450925082918401908083835b602083106104e85780518252601f1990920191602091820191016104c9565b51815160001960209485036101000a81019182169119929092161790915293909101958652604051958690030190942085549094506000935085925090810190811061053057fe5b60009182526020808320909101548352820192909252604001902054600160a060020a0316915050919050565b60606003826040518082805190602001908083835b602083106105915780518252601f199092019160209182019101610572565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208054808402870184019092528186529350915083018282801561044057602002820191906000526020600020905b8154815260200190600101908083116105eb5750505050509050919050565b60006004836040518082805190602001908083835b6020831061063e5780518252601f19909201916020918201910161061f565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820190942060009687529052505090912054600160a060020a031692915050565b60008054819074010000000000000000000000000000000000000000900460ff16806106bd5750600054600160a060020a031633145b15156106c857600080fd5b604080517f01ffc9a70000000000000000000000000000000000000000000000000000000080825260048201529051600160a060020a038516916301ffc9a79160248083019260209291908290030181600087803b15801561072957600080fd5b505af115801561073d573d6000803e3d6000fd5b505050506040513d602081101561075357600080fd5b5051151561076057600080fd5b604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fd48445ff0000000000000000000000000000000000000000000000000000000060048201529051600160a060020a038516916301ffc9a79160248083019260209291908290030181600087803b1580156107e157600080fd5b505af11580156107f5573d6000803e3d6000fd5b505050506040513d602081101561080b57600080fd5b5051151561081857600080fd5b6002856040518082805190602001908083835b6020831061084a5780518252601f19909201916020918201910161082b565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a031693505082159050806108995750600160a060020a03821633145b151561092c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f6964656e74696669657220616c7265616479207265676973746572656420627960448201527f20616e6f746865722072656769737472616e7400000000000000000000000000606482015290519081900360840190fd5b600160a060020a0382161515610a0e5760018054808201808355600092909252865161097f917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601906020890190610d51565b5050336002866040518082805190602001908083835b602083106109b45780518252601f199092019160209182019101610995565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03949094169390931790925550505b6003856040518082805190602001908083835b60208310610a405780518252601f199092019160209182019101610a21565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092208054909350600010159150610b2e905057805481906000198101908110610a8e57fe5b906000526020600020015484111515610b2e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f6e65772076657273696f6e206d7573742062652067726561746572207468616e60448201527f206f6c642076657273696f6e7300000000000000000000000000000000000000606482015290519081900360840190fd5b8054600181018255600082815260209081902090910185905560405186518592600492899290918291908401908083835b60208310610b7e5780518252601f199092019160209182019101610b5f565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382019094206000998a5290525050909420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039095169490941790935550505050565b600054600160a060020a03163314610bff57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600054600160a060020a03163314610c7a57600080fd5b610c8381610cd4565b50565b600054600160a060020a03163314610c9d57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a0381161515610ce957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610d9257805160ff1916838001178555610dbf565b82800160010185558215610dbf579182015b82811115610dbf578251825591602001919060010190610da4565b50610dcb929150610dcf565b5090565b61045091905b80821115610dcb5760008155600101610dd55600a165627a7a72305820a39d4ef7a492008cb622ae405c474d52337ced3c21b26e0a65a65d50484ce1750029", "deployedBytecode": "0x6080604052600436106100a35763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663121a42c081146100a857806324d48c0d146101355780632a4798da1461015c5780632cf5cf8b146101d15780635147fba11461027a5780635dc1aad3146102d5578063715018a6146103415780638da5cb5b14610356578063f2fde38b1461036b578063fcfff16f1461038c575b600080fd5b3480156100b457600080fd5b506100c06004356103a1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fa5781810151838201526020016100e2565b50505050905090810190601f1680156101275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561014157600080fd5b5061014a61044c565b60408051918252519081900360200190f35b34801561016857600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101b59436949293602493928401919081908401838280828437509497506104539650505050505050565b60408051600160a060020a039092168252519081900360200190f35b3480156101dd57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261022a94369492936024939284019190819084018382808284375094975061055d9650505050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561026657818101518382015260200161024e565b505050509050019250505060405180910390f35b34801561028657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101b5943694929360249392840191908190840183828082843750949750509335945061060a9350505050565b3480156102e157600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261033f9436949293602493928401919081908401838280828437509497505084359550505050602090910135600160a060020a03169050610687565b005b34801561034d57600080fd5b5061033f610be8565b34801561036257600080fd5b506101b5610c54565b34801561037757600080fd5b5061033f600160a060020a0360043516610c63565b34801561039857600080fd5b5061033f610c86565b60606001828154811015156103b257fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156104405780601f1061041557610100808354040283529160200191610440565b820191906000526020600020905b81548152906001019060200180831161042357829003601f168201915b50505050509050919050565b6001545b90565b6000806003836040518082805190602001908083835b602083106104885780518252601f199092019160209182019101610469565b51815160209384036101000a600019018019909216911617905292019485525060405193849003810184208751909550600494889450925082918401908083835b602083106104e85780518252601f1990920191602091820191016104c9565b51815160001960209485036101000a81019182169119929092161790915293909101958652604051958690030190942085549094506000935085925090810190811061053057fe5b60009182526020808320909101548352820192909252604001902054600160a060020a0316915050919050565b60606003826040518082805190602001908083835b602083106105915780518252601f199092019160209182019101610572565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820185208054808402870184019092528186529350915083018282801561044057602002820191906000526020600020905b8154815260200190600101908083116105eb5750505050509050919050565b60006004836040518082805190602001908083835b6020831061063e5780518252601f19909201916020918201910161061f565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820190942060009687529052505090912054600160a060020a031692915050565b60008054819074010000000000000000000000000000000000000000900460ff16806106bd5750600054600160a060020a031633145b15156106c857600080fd5b604080517f01ffc9a70000000000000000000000000000000000000000000000000000000080825260048201529051600160a060020a038516916301ffc9a79160248083019260209291908290030181600087803b15801561072957600080fd5b505af115801561073d573d6000803e3d6000fd5b505050506040513d602081101561075357600080fd5b5051151561076057600080fd5b604080517f01ffc9a70000000000000000000000000000000000000000000000000000000081527fd48445ff0000000000000000000000000000000000000000000000000000000060048201529051600160a060020a038516916301ffc9a79160248083019260209291908290030181600087803b1580156107e157600080fd5b505af11580156107f5573d6000803e3d6000fd5b505050506040513d602081101561080b57600080fd5b5051151561081857600080fd5b6002856040518082805190602001908083835b6020831061084a5780518252601f19909201916020918201910161082b565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a031693505082159050806108995750600160a060020a03821633145b151561092c57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f6964656e74696669657220616c7265616479207265676973746572656420627960448201527f20616e6f746865722072656769737472616e7400000000000000000000000000606482015290519081900360840190fd5b600160a060020a0382161515610a0e5760018054808201808355600092909252865161097f917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601906020890190610d51565b5050336002866040518082805190602001908083835b602083106109b45780518252601f199092019160209182019101610995565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03949094169390931790925550505b6003856040518082805190602001908083835b60208310610a405780518252601f199092019160209182019101610a21565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092208054909350600010159150610b2e905057805481906000198101908110610a8e57fe5b906000526020600020015484111515610b2e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f6e65772076657273696f6e206d7573742062652067726561746572207468616e60448201527f206f6c642076657273696f6e7300000000000000000000000000000000000000606482015290519081900360840190fd5b8054600181018255600082815260209081902090910185905560405186518592600492899290918291908401908083835b60208310610b7e5780518252601f199092019160209182019101610b5f565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382019094206000998a5290525050909420805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039095169490941790935550505050565b600054600160a060020a03163314610bff57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b600054600160a060020a03163314610c7a57600080fd5b610c8381610cd4565b50565b600054600160a060020a03163314610c9d57600080fd5b6000805474ff0000000000000000000000000000000000000000191674010000000000000000000000000000000000000000179055565b600160a060020a0381161515610ce957600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610d9257805160ff1916838001178555610dbf565b82800160010185558215610dbf579182015b82811115610dbf578251825591602001919060010190610da4565b50610dcb929150610dcf565b5090565b61045091905b80821115610dcb5760008155600101610dd55600a165627a7a72305820a39d4ef7a492008cb622ae405c474d52337ced3c21b26e0a65a65d50484ce1750029", "sourceMap": "141:2670:5:-;;;407:76;8:9:-1;5:2;;;30:1;27;20:12;5:2;407:76:5;;;;;;;;;;;;;567:5:34;:18;;460:16:5;;;;;-1:-1:-1;;;;;;;;;;;;567:18:34;;;575:10;567:18;460:16:5;;;;;;;;;;141:2670;;;;;;", "deployedSourceMap": "141:2670:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2116:118;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2116:118:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2116:118:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2005:105;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2005:105:5;;;;;;;;;;;;;;;;;;;;2557:252;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2557:252:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2557:252:5;;-1:-1:-1;2557:252:5;;-1:-1:-1;;;;;;;2557:252:5;;;;;-1:-1:-1;;;;;2557:252:5;;;;;;;;;;;;;;2240:134;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2240:134:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2240:134:5;;-1:-1:-1;2240:134:5;;-1:-1:-1;;;;;;;2240:134:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2240:134:5;;;;;;;;;;;;;;;;;2380:171;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;2380:171:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2380:171:5;;-1:-1:-1;;2380:171:5;;;-1:-1:-1;2380:171:5;;-1:-1:-1;;;;2380:171:5;1003:996;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1003:996:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1003:996:5;;-1:-1:-1;;1003:996:5;;;-1:-1:-1;;;;1003:996:5;;;;;-1:-1:-1;;;;;1003:996:5;;-1:-1:-1;1003:996:5;;;;1001:111:34;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1001:111:34;;;;238:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;238:20:34;;;;1274:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1274:103:34;-1:-1:-1;;;;;1274:103:34;;;;;567:63:5;;8:9:-1;5:2;;;30:1;27;20:12;5:2;567:63:5;;;;2116:118;2172:17;2208:11;2220:6;2208:19;;;;;;;;;;;;;;;;;;;;2201:26;;;;;;;-1:-1:-1;;2201:26:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2208:19;2201:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2116:118;;;:::o;2005:105::-;2085:11;:18;2005:105;;:::o;2557:252::-;2624:17;2653:23;2679:20;2700:11;2679:33;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;2679::5;;;;;-1:-1:-1;2679:33:5;;;;;;;;;;2729:42;;2679:33;;-1:-1:-1;2729:29:5;;:42;;-1:-1:-1;2679:33:5;-1:-1:-1;2679:33:5;;2729:42;;;;2679:33;2729:42;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;-1:-1;;263:2;259:12;;;254:3;250:22;246:30;;340:21;;;311:9;;295:26;;;;377:20;365:33;;;2729:42:5;;;;;;;;;;;;;;;;;2781:15;;2729:42;;-1:-1:-1;;;;2772:8:5;;-1:-1:-1;2781:19:5;;;;2772:29;;;;;;;;;;;;;;;;;;2729:73;;;;;;;;;;;;;-1:-1:-1;;;;;2729:73:5;;-1:-1:-1;2557:252:5;;;;:::o;2240:134::-;2301:14;2334:20;2355:11;2334:33;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;2334::5;;;;;-1:-1:-1;2334:33:5;;;;;;;;;;;2327:40;;;;;;;;;;;;;;;2334:33;-1:-1:-1;2327:40:5;-1:-1:-1;2327:40:5;;2334:33;2327:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2240:134;;;:::o;2380:171::-;2456:17;2492:29;2522:11;2492:42;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;2492:42:5;;;;;-1:-1:-1;2492:42:5;;;;;;;;;;;;-1:-1:-1;2492:52:5;;;;;-1:-1:-1;;2492:52:5;;;;-1:-1:-1;;;;;2492:52:5;;2380:171;-1:-1:-1;;2380:171:5:o;1003:996::-;1321:18;1101:6;;1321:18;;1101:6;;;;;;:29;;-1:-1:-1;1125:5:5;;-1:-1:-1;;;;;1125:5:5;1111:10;:19;1101:29;1093:38;;;;;;;;1180:39;;;;;;;;;;;;;-1:-1:-1;;;;;1180:27:5;;;;;:39;;;;;;;;;;;;;;-1:-1:-1;1180:27:5;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;1180:39:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1180:39:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1180:39:5;1172:48;;;;;;;;1270:39;;;;;;;;;;;;;-1:-1:-1;;;;;1270:27:5;;;;;:39;;;;;;;;;;;;;;-1:-1:-1;1270:27:5;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;1270:39:5;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1270:39:5;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1270:39:5;1262:48;;;;;;;;1342:22;1365:11;1342:35;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;1342:35:5;;;;;-1:-1:-1;1342:35:5;;;;;;;;;;;-1:-1:-1;;;;;1342:35:5;;-1:-1:-1;;1395:24:5;;;-1:-1:-1;1395:24:5;:52;;-1:-1:-1;;;;;;1423:24:5;;1437:10;1423:24;1395:52;1387:116;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1517:24:5;;;1513:146;;;1557:11;27:10:-1;;23:18;;;45:23;;;-1:-1;1557:29:5;;;;;;;;;;;;;;;;:::i;:::-;;;1638:10;1600:22;1623:11;1600:35;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;1600:35:5;;;;;-1:-1:-1;1600:35:5;;;;;;;;;;:48;;-1:-1:-1;;1600:48:5;-1:-1:-1;;;;;1600:48:5;;;;;;;;;;;-1:-1:-1;;1513:146:5;1695:20;1716:11;1695:33;;;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;1695::5;;;;;-1:-1:-1;1695:33:5;;;;;;;;;;1742:15;;1695:33;;-1:-1:-1;;;1738:148:5;;-1:-1:-1;1738:148:5;;-1:-1:-1;1738:148:5;1805:15;;1796:8;;-1:-1:-1;;1805:19:5;;;1796:29;;;;;;;;;;;;;;1785:8;:40;1777:98;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;39:1;23:18;;45:23;;-1:-1;1895:23:5;;;;;;;;;;;;;;1928:42;;;;1983:9;;1928:29;;1958:11;;1928:42;;;;;;;;;;;36:153:-1;66:2;58:11;;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;1928:42:5;;;;;-1:-1:-1;1928:42:5;;;;;;;;;;;;-1:-1:-1;1928:52:5;;;;;-1:-1:-1;;1928:52:5;;;:64;;-1:-1:-1;;1928:64:5;-1:-1:-1;;;;;1928:64:5;;;;;;;;;;-1:-1:-1;;;;1003:996:5:o;1001:111:34:-;719:5;;-1:-1:-1;;;;;719:5:34;705:10;:19;697:28;;;;;;1077:5;;;1058:25;;-1:-1:-1;;;;;1077:5:34;;;;1058:25;;;1105:1;1089:18;;-1:-1:-1;;1089:18:34;;;1001:111::o;238:20::-;;;-1:-1:-1;;;;;238:20:34;;:::o;1274:103::-;719:5;;-1:-1:-1;;;;;719:5:34;705:10;:19;697:28;;;;;;1343:29;1362:9;1343:18;:29::i;:::-;1274:103;:::o;567:63:5:-;719:5:34;;-1:-1:-1;;;;;719:5:34;705:10;:19;697:28;;;;;;610:6:5;:13;;-1:-1:-1;;610:13:5;;;;;567:63::o;1512:171:34:-;-1:-1:-1;;;;;1582:23:34;;;;1574:32;;;;;;1638:5;;;1617:38;;-1:-1:-1;;;;;1617:38:34;;;;1638:5;;;1617:38;;;1661:5;:17;;-1:-1:-1;;1661:17:34;-1:-1:-1;;;;;1661:17:34;;;;;;;;;;1512:171::o;141:2670:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;141:2670:5;;;-1:-1:-1;141:2670:5;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;", "source": "pragma solidity ^0.4.24;\n\nimport \"../template/Template.sol\";\n\n/**\n * @title Registry\n * @notice Registry maintains Contracts by version.\n */\ncontract Registry is Ownable {\n bool opened;\n string[] identifiers;\n mapping(string => address) registrantOfIdentifier;\n mapping(string => uint[]) versionsOfIdentifier;\n mapping(string => mapping(uint => Template)) templateOfVersionOfIdentifier;\n\n constructor(bool _opened) Ownable() public {\n opened = _opened;\n }\n\n /**\n * @notice Open the Registry so that anyone can register.\n */\n function open() onlyOwner public {\n opened = true;\n }\n\n /**\n * @notice Registers a new `Template`.\n * @param _identifier If any template was registered for the same identifier, the registrant of the templates must be the same.\n * @param _version If any template was registered for the same identifier, new version must be greater than the old one.\n * @param _template Template to be registered.\n */\n function register(string _identifier, uint _version, Template _template) public {\n require(opened || msg.sender == owner);\n\n // InterfaceId_ERC165\n require(_template.supportsInterface(0x01ffc9a7));\n // InterfaceId_Template\n require(_template.supportsInterface(0xd48445ff));\n\n address registrant = registrantOfIdentifier[_identifier];\n require(registrant == address(0) || registrant == msg.sender, \"identifier already registered by another registrant\");\n if (registrant == address(0)) {\n identifiers.push(_identifier);\n registrantOfIdentifier[_identifier] = msg.sender;\n }\n\n uint[] storage versions = versionsOfIdentifier[_identifier];\n if (versions.length > 0) {\n require(_version > versions[versions.length - 1], \"new version must be greater than old versions\");\n }\n versions.push(_version);\n templateOfVersionOfIdentifier[_identifier][_version] = _template;\n }\n\n function numberOfIdentifiers() public view returns (uint size) {\n return identifiers.length;\n }\n\n function identifierAt(uint _index) public view returns (string identifier) {\n return identifiers[_index];\n }\n\n function versionsOf(string _identifier) public view returns (uint[] version) {\n return versionsOfIdentifier[_identifier];\n }\n\n function templateOf(string _identifier, uint _version) public view returns (Template template) {\n return templateOfVersionOfIdentifier[_identifier][_version];\n }\n\n function latestTemplateOf(string _identifier) public view returns (Template template) {\n uint[] storage versions = versionsOfIdentifier[_identifier];\n return templateOfVersionOfIdentifier[_identifier][versions[versions.length - 1]];\n }\n}\n", "sourcePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/registry/Registry.sol", "ast": { "absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/registry/Registry.sol", "exportedSymbols": { "Registry": [ 999 ] }, "id": 1000, "nodeType": "SourceUnit", "nodes": [ { "id": 763, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:5" }, { "absolutePath": "/Users/yoonjae/SolidityProjects/tokenboost-solidity/contracts/template/Template.sol", "file": "../template/Template.sol", "id": 764, "nodeType": "ImportDirective", "scope": 1000, "sourceUnit": 1937, "src": "26:34:5", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 765, "name": "Ownable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 5429, "src": "162:7:5", "typeDescriptions": { "typeIdentifier": "t_contract$_Ownable_$5429", "typeString": "contract Ownable" } }, "id": 766, "nodeType": "InheritanceSpecifier", "src": "162:7:5" } ], "contractDependencies": [ 5429 ], "contractKind": "contract", "documentation": "@title Registry\n@notice Registry maintains Contracts by version.", "fullyImplemented": true, "id": 999, "linearizedBaseContracts": [ 999, 5429 ], "name": "Registry", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 768, "name": "opened", "nodeType": "VariableDeclaration", "scope": 999, "src": "176:11:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 767, "name": "bool", "nodeType": "ElementaryTypeName", "src": "176:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 771, "name": "identifiers", "nodeType": "VariableDeclaration", "scope": 999, "src": "193:20:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_storage_$dyn_storage", "typeString": "string[]" }, "typeName": { "baseType": { "id": 769, "name": "string", "nodeType": "ElementaryTypeName", "src": "193:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "id": 770, "length": null, "nodeType": "ArrayTypeName", "src": "193:8:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_string_storage_$dyn_storage_ptr", "typeString": "string[]" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 775, "name": "registrantOfIdentifier", "nodeType": "VariableDeclaration", "scope": 999, "src": "219:49:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string => address)" }, "typeName": { "id": 774, "keyType": { "id": 772, "name": "string", "nodeType": "ElementaryTypeName", "src": "227:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "219:26:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string => address)" }, "valueType": { "id": 773, "name": "address", "nodeType": "ElementaryTypeName", "src": "237:7:5", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 780, "name": "versionsOfIdentifier", "nodeType": "VariableDeclaration", "scope": 999, "src": "274:46:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_array$_t_uint256_$dyn_storage_$", "typeString": "mapping(string => uint256[])" }, "typeName": { "id": 779, "keyType": { "id": 776, "name": "string", "nodeType": "ElementaryTypeName", "src": "282:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "274:25:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_array$_t_uint256_$dyn_storage_$", "typeString": "mapping(string => uint256[])" }, "valueType": { "baseType": { "id": 777, "name": "uint", "nodeType": "ElementaryTypeName", "src": "292:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 778, "length": null, "nodeType": "ArrayTypeName", "src": "292:6:5", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 786, "name": "templateOfVersionOfIdentifier", "nodeType": "VariableDeclaration", "scope": 999, "src": "326:74:5", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_uint256_$_t_contract$_Template_$1936_$_$", "typeString": "mapping(string => mapping(uint256 => contract Template))" }, "typeName": { "id": 785, "keyType": { "id": 781, "name": "string", "nodeType": "ElementaryTypeName", "src": "334:6:5", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "326:44:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_mapping$_t_uint256_$_t_contract$_Template_$1936_$_$", "typeString": "mapping(string => mapping(uint256 => contract Template))" }, "valueType": { "id": 784, "keyType": { "id": 782, "name": "uint", "nodeType": "ElementaryTypeName", "src": "352:4:5", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Mapping", "src": "344:25:5", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_uint256_$_t_contract$_Template_$1936_$", "typeString": "mapping(uint256 => contract Template)" }, "valueType": { "contractScope": null, "id": 783, "name": "Template", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 1936, "src": "360:8:5", "typeDescriptions": { "typeIdentifier": "t_contract$_Template_$1936", "typeString": "contract Template" } } } }, "value": null, "visibility": "internal" }, { "body": { "id": 797, "nodeType": "Block", "src": "450:33:5", "statements": [ { "expression": { "argumentTypes": null, "id": 795, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 793, "name": "opened", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 768, "src": "460:6:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 794, "name": "_opened", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 788, "src": "469:7:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "460:16:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 796, "nodeType": "ExpressionStatement", "src": "460:16:5" } ] }, "documentation": null, "id": 798, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [ { "arguments": [], "id": 791, "modifierName": { "argumentTypes": null, "id": 790, "name": "Ownable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5429, "src": "433:7:5", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Ownable_$5429_$", "typeString": "type(contract Ownable)" } }, "nodeType": "ModifierInvocation", "src": "433:9:5" } ], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 789, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 788, "name": "_opened", "nodeType": "VariableDeclaration", "scope": 798, "src": "419:12:5", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 787, "name": "bool", "nodeType": "ElementaryTypeName", "src": "419:4:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "418:14:5" }, "payable": false, "returnParameters": { "id": 792, "nodeType": "ParameterList", "parameters": [], "src": "450:0:5" }, "scope": 999, "src": "407:76:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 807, "nodeType": "Block", "src": "600:30:5", "statements": [ { "expression": { "argumentTypes": null, "id": 805, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 803, "name": "opened", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 768, "src": "610:6:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "hexValue": "74727565", "id": 804, "isConstant": false, "isLValue": false, "isPure": true, "kind": "bool", "lValueRequested": false, "nodeType": "Literal", "src": "619:4:5", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "value": "true" }, "src": "610:13:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 806, "nodeType": "ExpressionStatement", "src": "610:13:5" } ] }, "documentation": "@notice Open the Registry so that anyone can register.", "id": 808, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 801, "modifierName": { "argumentTypes": null, "id": 800, "name": "onlyOwner", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 5377, "src": "583:9:5", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "583:9:5" } ], "name": "open", "nodeType": "FunctionDefinition", "parameters": { "id": 799, "nodeType": "ParameterList", "parameters": [], "src": "580:2:5" }, "payable": false, "returnParameters": { "id": 802, "nodeType": "ParameterList", "parameters": [], "src": "600:0:5" }, "scope": 999, "src": "567:63:5", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 920, "nodeType": "Block", "src": "1083:916:5", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 823, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 818, "name": "opened", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 768, "src": "1101:6:5", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 822, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 819, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 7118, "src": "1111:3:5", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 820, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null,