ContractABI/RootContract.json
{ "contractName": "RootContract", "abi": [ { "constant": true, "inputs": [], "name": "operator", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x570ca735" }, { "inputs": [ { "name": "_operator", "type": "address" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor", "signature": "constructor" }, { "constant": true, "inputs": [ { "name": "_contractName", "type": "string" } ], "name": "getContract", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function", "signature": "0x35817773" }, { "constant": false, "inputs": [ { "name": "_contractName", "type": "string" }, { "name": "_newAddr", "type": "address" } ], "name": "updateContract", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function", "signature": "0x697a60b3" } ], "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"name\":\"_contractName\",\"type\":\"string\"}],\"name\":\"getContract\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"operator\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_contractName\",\"type\":\"string\"},{\"name\":\"_newAddr\",\"type\":\"address\"}],\"name\":\"updateContract\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_operator\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/d/a/1/s/contracts/RootContract.sol\":\"RootContract\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/d/a/1/s/contracts/Constants.sol\":{\"keccak256\":\"0xb0c311d292c0115c36c1d5c3ed0c83afd594c90dd41d6c7992a1f66dff9a4375\",\"urls\":[\"bzzr://07b29230dbc162d19e3bef6a6217b21ebbac525e003ded9ba374e1d421f5103d\"]},\"/d/a/1/s/contracts/IUpdateable.sol\":{\"keccak256\":\"0xedc79dd0e302081684559ce370108b6e19ea702a03ce74a9cc3e26f9efb8af35\",\"urls\":[\"bzzr://364be739cfaaa27ff9c441f16c8e5012a00d60ac61d0ac1ed22884e37a602856\"]},\"/d/a/1/s/contracts/RootContract.sol\":{\"keccak256\":\"0x8c1cae8fdf5ed0e4ee1271fd3c92ec919ac05ef140bea6ee80198762a7348889\",\"urls\":[\"bzzr://848dee81af651f184a07897de87af9f15dca5ab28bb2518e06ab33f751cee588\"]}},\"version\":1}", "bytecode": "0x608060405234801561001057600080fd5b50604051602080610567833981016040525160018054600160a060020a031916600160a060020a03909216919091179055610517806100506000396000f30060806040526004361061003d5763ffffffff60e060020a600035041663358177738114610042578063570ca7351461007e578063697a60b314610093575b600080fd5b34801561004e57600080fd5b5061006260048035602481019101356100c3565b60408051600160a060020a039092168252519081900360200190f35b34801561008a57600080fd5b506100626100fb565b34801561009f57600080fd5b506100c16024600480358281019291013590600160a060020a0390351661010a565b005b60008083836040518083838082843790910194855250506040519283900360200190922054600160a060020a03169250505092915050565b600154600160a060020a031681565b6001546000908190600160a060020a03163314806102605750600073__Constants_____________________________630b02e5b96040518163ffffffff1660e060020a02815260040160006040518083038186803b15801561016c57600080fd5b505af4158015610180573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156101a957600080fd5b8101908080516401000000008111156101c157600080fd5b820160208101848111156101d457600080fd5b81516401000000008111828201871017156101ee57600080fd5b50509291905050506040518082805190602001908083835b602083106102255780518252601f199092019160209182019101610206565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a031633149150505b15156102f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f6e6c79207065726d697473206f70657261746f7220616e6420436f6e74726160448201527f63745570646174657220746f206163636573732e000000000000000000000000606482015290519081900360840190fd5b6000858560405180838380828437820191505092505050908152602001604051809103902060009054906101000a9004600160a060020a0316915082905080600160a060020a031663e8c757d66040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561036f57600080fd5b505af1158015610383573d6000803e3d6000fd5b505050506040513d602081101561039957600080fd5b5051600160a060020a0383811691161461043a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f43757272656e74206164647265737320646f6573206e6f74206d61746368207460448201527f68652075706461746546726f6d00000000000000000000000000000000000000606482015290519081900360840190fd5b80600160a060020a0316630f15f4c06040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561047857600080fd5b505af115801561048c573d6000803e3d6000fd5b505050508260008686604051808383808284379091019485525050604051928390036020019092208054600160a060020a039490941673ffffffffffffffffffffffffffffffffffffffff1990941693909317909255505050505050505600a165627a7a72305820023d63292e144f7aa8e1bd8af4df04d14152948ee754be66f203ae98ffb87a5e0029", "deployedBytecode": "0x60806040526004361061003d5763ffffffff60e060020a600035041663358177738114610042578063570ca7351461007e578063697a60b314610093575b600080fd5b34801561004e57600080fd5b5061006260048035602481019101356100c3565b60408051600160a060020a039092168252519081900360200190f35b34801561008a57600080fd5b506100626100fb565b34801561009f57600080fd5b506100c16024600480358281019291013590600160a060020a0390351661010a565b005b60008083836040518083838082843790910194855250506040519283900360200190922054600160a060020a03169250505092915050565b600154600160a060020a031681565b6001546000908190600160a060020a03163314806102605750600073__Constants_____________________________630b02e5b96040518163ffffffff1660e060020a02815260040160006040518083038186803b15801561016c57600080fd5b505af4158015610180573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156101a957600080fd5b8101908080516401000000008111156101c157600080fd5b820160208101848111156101d457600080fd5b81516401000000008111828201871017156101ee57600080fd5b50509291905050506040518082805190602001908083835b602083106102255780518252601f199092019160209182019101610206565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054600160a060020a031633149150505b15156102f357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f4f6e6c79207065726d697473206f70657261746f7220616e6420436f6e74726160448201527f63745570646174657220746f206163636573732e000000000000000000000000606482015290519081900360840190fd5b6000858560405180838380828437820191505092505050908152602001604051809103902060009054906101000a9004600160a060020a0316915082905080600160a060020a031663e8c757d66040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561036f57600080fd5b505af1158015610383573d6000803e3d6000fd5b505050506040513d602081101561039957600080fd5b5051600160a060020a0383811691161461043a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f43757272656e74206164647265737320646f6573206e6f74206d61746368207460448201527f68652075706461746546726f6d00000000000000000000000000000000000000606482015290519081900360840190fd5b80600160a060020a0316630f15f4c06040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561047857600080fd5b505af115801561048c573d6000803e3d6000fd5b505050508260008686604051808383808284379091019485525050604051928390036020019092208054600160a060020a039490941673ffffffffffffffffffffffffffffffffffffffff1990941693909317909255505050505050505600a165627a7a72305820023d63292e144f7aa8e1bd8af4df04d14152948ee754be66f203ae98ffb87a5e0029", "sourceMap": "173:1120:12:-;;;613:77;8:9:-1;5:2;;;30:1;27;20:12;5:2;613:77:12;;;;;;;;;;;;;662:8;:20;;-1:-1:-1;;;;;;662:20:12;-1:-1:-1;;;;;662:20:12;;;;;;;;;173:1120;;;-1:-1:-1;173:1120:12;;", "deployedSourceMap": "173:1120:12:-;;;;;;;;;-1:-1:-1;;;173:1120:12;;;;;;;;;;;;;;;;;;;;;;;698:125;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;698:125:12;;;;;;;;;;;;;;;;-1:-1:-1;;;;;698:125:12;;;;;;;;;;;;;;333:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;333:23:12;;;;831:457;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;831:457:12;;;;;;;;;;;;;-1:-1:-1;;;;;831:457:12;;;;;;;698:125;764:7;791:9;801:13;;791:24;;;;;;;;;;;;;;;-1:-1:-1;;791:24:12;;;;;;;;;;;;-1:-1:-1;;;;;791:24:12;;-1:-1:-1;;;698:125:12;;;;:::o;333:23::-;;;-1:-1:-1;;;;;333:23:12;;:::o;831:457::-;441:8;;935:22;;;;-1:-1:-1;;;;;441:8:12;427:10;:22;;:78;;;467:9;477;:25;:27;;;;;-1:-1:-1;;;477:27:12;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;477:27:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;477:27:12;;;;;;39:16:-1;36:1;17:17;2:54;101:4;477:27:12;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:2;5:11;;2:2;;;29:1;26;19:12;2:2;477:27:12;;;;;;20:11:-1;15:3;12:20;9:2;;;45:1;42;35:12;9:2;64:21;;126:4;117:14;;142:31;;;139:2;;;186:1;183;176:12;139:2;218:10;;268:11;251:29;;293:43;;;290:58;-1:-1;239:118;236:2;;;370:1;367;360:12;236:2;0:382;;477:27:12;;;;;;467:38;;;;;;;;;;;;;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;;467:38:12;;;;;-1:-1:-1;467:38:12;;;;;;;;;;;-1:-1:-1;;;;;467:38:12;453:10;:52;;-1:-1:-1;;427:78:12;405:180;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;960:9;970:13;;960:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;960:24:12;935:49;;1033:8;995:47;;1093:11;-1:-1:-1;;;;;1093:31:12;;:33;;;;;-1:-1:-1;;;1093:33:12;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1093:33:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1093:33:12;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1093:33:12;-1:-1:-1;;;;;1075:51:12;;;;;;1053:146;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1212:11;-1:-1:-1;;;;;1212:20:12;;:22;;;;;-1:-1:-1;;;1212:22:12;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1212:22:12;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1212:22:12;;;;1272:8;1245:9;1255:13;;1245:24;;;;;;;;;;;;;;;-1:-1:-1;;1245:24:12;;;;;;;;;;;:35;;-1:-1:-1;;;;;1245:35:12;;;;-1:-1:-1;;1245:35:12;;;;;;;;;;-1:-1:-1;;;;;;;831:457:12:o", "source": "pragma solidity ^0.4.24;\r\n\r\nimport \"./Constants.sol\";\r\nimport \"./IUpdateable.sol\";\r\n\r\n/**\r\n * A RootContract maintains addresses of all smart contracts in the network\r\n */\r\ncontract RootContract {\r\n\r\n /**\r\n * mapping from contract name of to contract address\r\n */\r\n mapping(string => address) private contracts;\r\n\r\n address public operator;\r\n\r\n modifier updateAccessControl {\r\n require(\r\n msg.sender == operator || msg.sender == contracts[Constants.ContractUpdater()],\r\n \"Only permits operator and ContractUpdater to access.\"\r\n );\r\n _;\r\n }\r\n\r\n constructor(address _operator) public {\r\n operator = _operator;\r\n }\r\n\r\n function getContract(string _contractName) external view returns (address) {\r\n return contracts[_contractName];\r\n }\r\n\r\n function updateContract(string _contractName, address _newAddr) external updateAccessControl {\r\n address currentAddress = contracts[_contractName];\r\n IUpdateable newContract = IUpdateable(_newAddr);\r\n require(\r\n currentAddress == newContract.getAddressToReplace(),\r\n \"Current address does not match the updateFrom\"\r\n );\r\n\r\n newContract.activate();\r\n contracts[_contractName] = _newAddr;\r\n }\r\n\r\n}", "sourcePath": "d:\\a\\1\\s\\contracts\\RootContract.sol", "ast": { "absolutePath": "/d/a/1/s/contracts/RootContract.sol", "exportedSymbols": { "RootContract": [ 4081 ] }, "id": 4082, "nodeType": "SourceUnit", "nodes": [ { "id": 3987, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:12" }, { "absolutePath": "/d/a/1/s/contracts/Constants.sol", "file": "./Constants.sol", "id": 3988, "nodeType": "ImportDirective", "scope": 4082, "sourceUnit": 142, "src": "28:25:12", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/d/a/1/s/contracts/IUpdateable.sol", "file": "./IUpdateable.sol", "id": 3989, "nodeType": "ImportDirective", "scope": 4082, "sourceUnit": 2536, "src": "55:27:12", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "A RootContract maintains addresses of all smart contracts in the network\r", "fullyImplemented": true, "id": 4081, "linearizedBaseContracts": [ 4081 ], "name": "RootContract", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3993, "name": "contracts", "nodeType": "VariableDeclaration", "scope": 4081, "src": "280:44:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string => address)" }, "typeName": { "id": 3992, "keyType": { "id": 3990, "name": "string", "nodeType": "ElementaryTypeName", "src": "288:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "280:26:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string => address)" }, "valueType": { "id": 3991, "name": "address", "nodeType": "ElementaryTypeName", "src": "298:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } }, "value": null, "visibility": "private" }, { "constant": false, "id": 3995, "name": "operator", "nodeType": "VariableDeclaration", "scope": 4081, "src": "333:23:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3994, "name": "address", "nodeType": "ElementaryTypeName", "src": "333:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "body": { "id": 4015, "nodeType": "Block", "src": "394:211:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 4010, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4001, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 3998, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4096, "src": "427:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 3999, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "427:10:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4000, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3995, "src": "441:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "427:22:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4009, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4002, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4096, "src": "453:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4003, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "453:10:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4004, "name": "contracts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3993, "src": "467:9:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string memory => address)" } }, "id": 4008, "indexExpression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 4005, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 141, "src": "477:9:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$141_$", "typeString": "type(library Constants)" } }, "id": 4006, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "ContractUpdater", "nodeType": "MemberAccess", "referencedDeclaration": 124, "src": "477:25:12", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_pure$__$returns$_t_string_memory_ptr_$", "typeString": "function () pure returns (string memory)" } }, "id": 4007, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "477:27:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "467:38:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "453:52:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "427:78:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4f6e6c79207065726d697473206f70657261746f7220616e6420436f6e74726163745570646174657220746f206163636573732e", "id": 4011, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "520:54:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_584a2775d44e2feb5b6798b3d51cda3dfc79eb4651f2f9ec69470c152bcb18e6", "typeString": "literal_string \"Only permits operator and ContractUpdater to access.\"" }, "value": "Only permits operator and ContractUpdater to access." } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_584a2775d44e2feb5b6798b3d51cda3dfc79eb4651f2f9ec69470c152bcb18e6", "typeString": "literal_string \"Only permits operator and ContractUpdater to access.\"" } ], "id": 3997, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4099, 4100 ], "referencedDeclaration": 4100, "src": "405:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4012, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "405:180:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4013, "nodeType": "ExpressionStatement", "src": "405:180:12" }, { "id": 4014, "nodeType": "PlaceholderStatement", "src": "596:1:12" } ] }, "documentation": null, "id": 4016, "name": "updateAccessControl", "nodeType": "ModifierDefinition", "parameters": { "id": 3996, "nodeType": "ParameterList", "parameters": [], "src": "394:0:12" }, "src": "365:240:12", "visibility": "internal" }, { "body": { "id": 4025, "nodeType": "Block", "src": "651:39:12", "statements": [ { "expression": { "argumentTypes": null, "id": 4023, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4021, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3995, "src": "662:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4022, "name": "_operator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4018, "src": "673:9:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "662:20:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4024, "nodeType": "ExpressionStatement", "src": "662:20:12" } ] }, "documentation": null, "id": 4026, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 4019, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4018, "name": "_operator", "nodeType": "VariableDeclaration", "scope": 4026, "src": "625:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4017, "name": "address", "nodeType": "ElementaryTypeName", "src": "625:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "624:19:12" }, "payable": false, "returnParameters": { "id": 4020, "nodeType": "ParameterList", "parameters": [], "src": "651:0:12" }, "scope": 4081, "src": "613:77:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 4037, "nodeType": "Block", "src": "773:50:12", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4033, "name": "contracts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3993, "src": "791:9:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string memory => address)" } }, "id": 4035, "indexExpression": { "argumentTypes": null, "id": 4034, "name": "_contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4028, "src": "801:13:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "791:24:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 4032, "id": 4036, "nodeType": "Return", "src": "784:31:12" } ] }, "documentation": null, "id": 4038, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "getContract", "nodeType": "FunctionDefinition", "parameters": { "id": 4029, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4028, "name": "_contractName", "nodeType": "VariableDeclaration", "scope": 4038, "src": "719:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 4027, "name": "string", "nodeType": "ElementaryTypeName", "src": "719:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "718:22:12" }, "payable": false, "returnParameters": { "id": 4032, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4031, "name": "", "nodeType": "VariableDeclaration", "scope": 4038, "src": "764:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4030, "name": "address", "nodeType": "ElementaryTypeName", "src": "764:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "763:9:12" }, "scope": 4081, "src": "698:125:12", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { "id": 4079, "nodeType": "Block", "src": "924:364:12", "statements": [ { "assignments": [ 4048 ], "declarations": [ { "constant": false, "id": 4048, "name": "currentAddress", "nodeType": "VariableDeclaration", "scope": 4080, "src": "935:22:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4047, "name": "address", "nodeType": "ElementaryTypeName", "src": "935:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 4052, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4049, "name": "contracts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3993, "src": "960:9:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string memory => address)" } }, "id": 4051, "indexExpression": { "argumentTypes": null, "id": 4050, "name": "_contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4040, "src": "970:13:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "960:24:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "935:49:12" }, { "assignments": [ 4054 ], "declarations": [ { "constant": false, "id": 4054, "name": "newContract", "nodeType": "VariableDeclaration", "scope": 4080, "src": "995:23:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" }, "typeName": { "contractScope": null, "id": 4053, "name": "IUpdateable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2535, "src": "995:11:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" } }, "value": null, "visibility": "internal" } ], "id": 4058, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4056, "name": "_newAddr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4042, "src": "1033:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4055, "name": "IUpdateable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2535, "src": "1021:11:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUpdateable_$2535_$", "typeString": "type(contract IUpdateable)" } }, "id": 4057, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1021:21:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" } }, "nodeType": "VariableDeclarationStatement", "src": "995:47:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4060, "name": "currentAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4048, "src": "1075:14:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 4061, "name": "newContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4054, "src": "1093:11:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" } }, "id": 4062, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getAddressToReplace", "nodeType": "MemberAccess", "referencedDeclaration": 2534, "src": "1093:31:12", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 4063, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1093:33:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1075:51:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "43757272656e74206164647265737320646f6573206e6f74206d61746368207468652075706461746546726f6d", "id": 4065, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1141:47:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_bb7d630948ad73354f4d0abc5e56e7130c22039cfd7c2b1d6246e364dbd42096", "typeString": "literal_string \"Current address does not match the updateFrom\"" }, "value": "Current address does not match the updateFrom" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_bb7d630948ad73354f4d0abc5e56e7130c22039cfd7c2b1d6246e364dbd42096", "typeString": "literal_string \"Current address does not match the updateFrom\"" } ], "id": 4059, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4099, 4100 ], "referencedDeclaration": 4100, "src": "1053:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4066, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1053:146:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4067, "nodeType": "ExpressionStatement", "src": "1053:146:12" }, { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 4068, "name": "newContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4054, "src": "1212:11:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" } }, "id": 4070, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "activate", "nodeType": "MemberAccess", "referencedDeclaration": 2529, "src": "1212:20:12", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", "typeString": "function () external" } }, "id": 4071, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1212:22:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4072, "nodeType": "ExpressionStatement", "src": "1212:22:12" }, { "expression": { "argumentTypes": null, "id": 4077, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4073, "name": "contracts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3993, "src": "1245:9:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string memory => address)" } }, "id": 4075, "indexExpression": { "argumentTypes": null, "id": 4074, "name": "_contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4040, "src": "1255:13:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1245:24:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4076, "name": "_newAddr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4042, "src": "1272:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1245:35:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4078, "nodeType": "ExpressionStatement", "src": "1245:35:12" } ] }, "documentation": null, "id": 4080, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 4045, "modifierName": { "argumentTypes": null, "id": 4044, "name": "updateAccessControl", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4016, "src": "904:19:12", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "904:19:12" } ], "name": "updateContract", "nodeType": "FunctionDefinition", "parameters": { "id": 4043, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4040, "name": "_contractName", "nodeType": "VariableDeclaration", "scope": 4080, "src": "855:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 4039, "name": "string", "nodeType": "ElementaryTypeName", "src": "855:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4042, "name": "_newAddr", "nodeType": "VariableDeclaration", "scope": 4080, "src": "877:16:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4041, "name": "address", "nodeType": "ElementaryTypeName", "src": "877:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "854:40:12" }, "payable": false, "returnParameters": { "id": 4046, "nodeType": "ParameterList", "parameters": [], "src": "924:0:12" }, "scope": 4081, "src": "831:457:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 4082, "src": "173:1120:12" } ], "src": "0:1293:12" }, "legacyAST": { "absolutePath": "/d/a/1/s/contracts/RootContract.sol", "exportedSymbols": { "RootContract": [ 4081 ] }, "id": 4082, "nodeType": "SourceUnit", "nodes": [ { "id": 3987, "literals": [ "solidity", "^", "0.4", ".24" ], "nodeType": "PragmaDirective", "src": "0:24:12" }, { "absolutePath": "/d/a/1/s/contracts/Constants.sol", "file": "./Constants.sol", "id": 3988, "nodeType": "ImportDirective", "scope": 4082, "sourceUnit": 142, "src": "28:25:12", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "/d/a/1/s/contracts/IUpdateable.sol", "file": "./IUpdateable.sol", "id": 3989, "nodeType": "ImportDirective", "scope": 4082, "sourceUnit": 2536, "src": "55:27:12", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": "A RootContract maintains addresses of all smart contracts in the network\r", "fullyImplemented": true, "id": 4081, "linearizedBaseContracts": [ 4081 ], "name": "RootContract", "nodeType": "ContractDefinition", "nodes": [ { "constant": false, "id": 3993, "name": "contracts", "nodeType": "VariableDeclaration", "scope": 4081, "src": "280:44:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string => address)" }, "typeName": { "id": 3992, "keyType": { "id": 3990, "name": "string", "nodeType": "ElementaryTypeName", "src": "288:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "nodeType": "Mapping", "src": "280:26:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string => address)" }, "valueType": { "id": 3991, "name": "address", "nodeType": "ElementaryTypeName", "src": "298:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } }, "value": null, "visibility": "private" }, { "constant": false, "id": 3995, "name": "operator", "nodeType": "VariableDeclaration", "scope": 4081, "src": "333:23:12", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 3994, "name": "address", "nodeType": "ElementaryTypeName", "src": "333:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "public" }, { "body": { "id": 4015, "nodeType": "Block", "src": "394:211:12", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_bool", "typeString": "bool" }, "id": 4010, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4001, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 3998, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4096, "src": "427:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 3999, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "427:10:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "id": 4000, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3995, "src": "441:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "427:22:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "nodeType": "BinaryOperation", "operator": "||", "rightExpression": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4009, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 4002, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4096, "src": "453:3:12", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 4003, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "453:10:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4004, "name": "contracts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3993, "src": "467:9:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string memory => address)" } }, "id": 4008, "indexExpression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 4005, "name": "Constants", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 141, "src": "477:9:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_Constants_$141_$", "typeString": "type(library Constants)" } }, "id": 4006, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "ContractUpdater", "nodeType": "MemberAccess", "referencedDeclaration": 124, "src": "477:25:12", "typeDescriptions": { "typeIdentifier": "t_function_delegatecall_pure$__$returns$_t_string_memory_ptr_$", "typeString": "function () pure returns (string memory)" } }, "id": 4007, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "477:27:12", "typeDescriptions": { "typeIdentifier": "t_string_memory_ptr", "typeString": "string memory" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "467:38:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "453:52:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "src": "427:78:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "4f6e6c79207065726d697473206f70657261746f7220616e6420436f6e74726163745570646174657220746f206163636573732e", "id": 4011, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "520:54:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_584a2775d44e2feb5b6798b3d51cda3dfc79eb4651f2f9ec69470c152bcb18e6", "typeString": "literal_string \"Only permits operator and ContractUpdater to access.\"" }, "value": "Only permits operator and ContractUpdater to access." } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_584a2775d44e2feb5b6798b3d51cda3dfc79eb4651f2f9ec69470c152bcb18e6", "typeString": "literal_string \"Only permits operator and ContractUpdater to access.\"" } ], "id": 3997, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4099, 4100 ], "referencedDeclaration": 4100, "src": "405:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4012, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "405:180:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4013, "nodeType": "ExpressionStatement", "src": "405:180:12" }, { "id": 4014, "nodeType": "PlaceholderStatement", "src": "596:1:12" } ] }, "documentation": null, "id": 4016, "name": "updateAccessControl", "nodeType": "ModifierDefinition", "parameters": { "id": 3996, "nodeType": "ParameterList", "parameters": [], "src": "394:0:12" }, "src": "365:240:12", "visibility": "internal" }, { "body": { "id": 4025, "nodeType": "Block", "src": "651:39:12", "statements": [ { "expression": { "argumentTypes": null, "id": 4023, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 4021, "name": "operator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3995, "src": "662:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4022, "name": "_operator", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4018, "src": "673:9:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "662:20:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4024, "nodeType": "ExpressionStatement", "src": "662:20:12" } ] }, "documentation": null, "id": 4026, "implemented": true, "isConstructor": true, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 4019, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4018, "name": "_operator", "nodeType": "VariableDeclaration", "scope": 4026, "src": "625:17:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4017, "name": "address", "nodeType": "ElementaryTypeName", "src": "625:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "624:19:12" }, "payable": false, "returnParameters": { "id": 4020, "nodeType": "ParameterList", "parameters": [], "src": "651:0:12" }, "scope": 4081, "src": "613:77:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 4037, "nodeType": "Block", "src": "773:50:12", "statements": [ { "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4033, "name": "contracts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3993, "src": "791:9:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string memory => address)" } }, "id": 4035, "indexExpression": { "argumentTypes": null, "id": 4034, "name": "_contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4028, "src": "801:13:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "791:24:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "functionReturnParameters": 4032, "id": 4036, "nodeType": "Return", "src": "784:31:12" } ] }, "documentation": null, "id": 4038, "implemented": true, "isConstructor": false, "isDeclaredConst": true, "modifiers": [], "name": "getContract", "nodeType": "FunctionDefinition", "parameters": { "id": 4029, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4028, "name": "_contractName", "nodeType": "VariableDeclaration", "scope": 4038, "src": "719:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 4027, "name": "string", "nodeType": "ElementaryTypeName", "src": "719:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" } ], "src": "718:22:12" }, "payable": false, "returnParameters": { "id": 4032, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4031, "name": "", "nodeType": "VariableDeclaration", "scope": 4038, "src": "764:7:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4030, "name": "address", "nodeType": "ElementaryTypeName", "src": "764:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "763:9:12" }, "scope": 4081, "src": "698:125:12", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": { "id": 4079, "nodeType": "Block", "src": "924:364:12", "statements": [ { "assignments": [ 4048 ], "declarations": [ { "constant": false, "id": 4048, "name": "currentAddress", "nodeType": "VariableDeclaration", "scope": 4080, "src": "935:22:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4047, "name": "address", "nodeType": "ElementaryTypeName", "src": "935:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 4052, "initialValue": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4049, "name": "contracts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3993, "src": "960:9:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string memory => address)" } }, "id": 4051, "indexExpression": { "argumentTypes": null, "id": 4050, "name": "_contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4040, "src": "970:13:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "960:24:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "935:49:12" }, { "assignments": [ 4054 ], "declarations": [ { "constant": false, "id": 4054, "name": "newContract", "nodeType": "VariableDeclaration", "scope": 4080, "src": "995:23:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" }, "typeName": { "contractScope": null, "id": 4053, "name": "IUpdateable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 2535, "src": "995:11:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" } }, "value": null, "visibility": "internal" } ], "id": 4058, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 4056, "name": "_newAddr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4042, "src": "1033:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "id": 4055, "name": "IUpdateable", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2535, "src": "1021:11:12", "typeDescriptions": { "typeIdentifier": "t_type$_t_contract$_IUpdateable_$2535_$", "typeString": "type(contract IUpdateable)" } }, "id": 4057, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1021:21:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" } }, "nodeType": "VariableDeclarationStatement", "src": "995:47:12" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 4064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 4060, "name": "currentAddress", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4048, "src": "1075:14:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 4061, "name": "newContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4054, "src": "1093:11:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" } }, "id": 4062, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "getAddressToReplace", "nodeType": "MemberAccess", "referencedDeclaration": 2534, "src": "1093:31:12", "typeDescriptions": { "typeIdentifier": "t_function_external_view$__$returns$_t_address_$", "typeString": "function () view external returns (address)" } }, "id": 4063, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1093:33:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1075:51:12", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, { "argumentTypes": null, "hexValue": "43757272656e74206164647265737320646f6573206e6f74206d61746368207468652075706461746546726f6d", "id": 4065, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "1141:47:12", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_bb7d630948ad73354f4d0abc5e56e7130c22039cfd7c2b1d6246e364dbd42096", "typeString": "literal_string \"Current address does not match the updateFrom\"" }, "value": "Current address does not match the updateFrom" } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" }, { "typeIdentifier": "t_stringliteral_bb7d630948ad73354f4d0abc5e56e7130c22039cfd7c2b1d6246e364dbd42096", "typeString": "literal_string \"Current address does not match the updateFrom\"" } ], "id": 4059, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4099, 4100 ], "referencedDeclaration": 4100, "src": "1053:7:12", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", "typeString": "function (bool,string memory) pure" } }, "id": 4066, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1053:146:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4067, "nodeType": "ExpressionStatement", "src": "1053:146:12" }, { "expression": { "argumentTypes": null, "arguments": [], "expression": { "argumentTypes": [], "expression": { "argumentTypes": null, "id": 4068, "name": "newContract", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4054, "src": "1212:11:12", "typeDescriptions": { "typeIdentifier": "t_contract$_IUpdateable_$2535", "typeString": "contract IUpdateable" } }, "id": 4070, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "activate", "nodeType": "MemberAccess", "referencedDeclaration": 2529, "src": "1212:20:12", "typeDescriptions": { "typeIdentifier": "t_function_external_nonpayable$__$returns$__$", "typeString": "function () external" } }, "id": 4071, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1212:22:12", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 4072, "nodeType": "ExpressionStatement", "src": "1212:22:12" }, { "expression": { "argumentTypes": null, "id": 4077, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 4073, "name": "contracts", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 3993, "src": "1245:9:12", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_string_memory_$_t_address_$", "typeString": "mapping(string memory => address)" } }, "id": 4075, "indexExpression": { "argumentTypes": null, "id": 4074, "name": "_contractName", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4040, "src": "1255:13:12", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string calldata" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1245:24:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 4076, "name": "_newAddr", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4042, "src": "1272:8:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1245:35:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 4078, "nodeType": "ExpressionStatement", "src": "1245:35:12" } ] }, "documentation": null, "id": 4080, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": null, "id": 4045, "modifierName": { "argumentTypes": null, "id": 4044, "name": "updateAccessControl", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4016, "src": "904:19:12", "typeDescriptions": { "typeIdentifier": "t_modifier$__$", "typeString": "modifier ()" } }, "nodeType": "ModifierInvocation", "src": "904:19:12" } ], "name": "updateContract", "nodeType": "FunctionDefinition", "parameters": { "id": 4043, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 4040, "name": "_contractName", "nodeType": "VariableDeclaration", "scope": 4080, "src": "855:20:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_string_calldata_ptr", "typeString": "string" }, "typeName": { "id": 4039, "name": "string", "nodeType": "ElementaryTypeName", "src": "855:6:12", "typeDescriptions": { "typeIdentifier": "t_string_storage_ptr", "typeString": "string" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 4042, "name": "_newAddr", "nodeType": "VariableDeclaration", "scope": 4080, "src": "877:16:12", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 4041, "name": "address", "nodeType": "ElementaryTypeName", "src": "877:7:12", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "854:40:12" }, "payable": false, "returnParameters": { "id": 4046, "nodeType": "ParameterList", "parameters": [], "src": "924:0:12" }, "scope": 4081, "src": "831:457:12", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" } ], "scope": 4082, "src": "173:1120:12" } ], "src": "0:1293:12" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": { "1554487835301": { "events": {}, "links": { "Constants": "0xEEA4778499C4a15bE9F26889B64f1fd5DAe452a0" }, "address": "0x30F67AFd16791bf66E6669cf61048cf1A7Db53AC", "transactionHash": "0x48c38de06f5794aa008099d20ea58ceca17e5ee4c8a89a45de7d675fff7ae79b" } }, "schemaVersion": "3.0.6", "updatedAt": "2019-04-05T18:10:58.786Z", "devdoc": { "methods": {} }, "userdoc": { "methods": {} } } |