@gooddollar/goodcontracts
Version:
GoodDollar Contracts
1,112 lines • 314 kB
JSON
{
"contractName": "ProxyAdmin",
"abi": [
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "proxy",
"type": "address"
},
{
"internalType": "address",
"name": "impl",
"type": "address"
}
],
"name": "upgrade",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"internalType": "address",
"name": "proxy",
"type": "address"
},
{
"internalType": "address",
"name": "impl",
"type": "address"
},
{
"internalType": "bytes",
"name": "callData",
"type": "bytes"
}
],
"name": "upgradeAndCall",
"outputs": [],
"payable": true,
"stateMutability": "payable",
"type": "function"
}
],
"metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"impl\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"proxy\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"impl\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"callData\",\"type\":\"bytes\"}],\"name\":\"upgradeAndCall\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/UpgradesRegistrar.sol\":\"ProxyAdmin\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/UpgradesRegistrar.sol\":{\"keccak256\":\"0x5b1193d14af39cfef2bdc8790fa7241c8f1474419268e7460364c0229188d102\",\"urls\":[\"bzz-raw://77600bc29cffe4432d2f68b1cb7e6331d52594005517575459fe2baa10434a5c\",\"dweb:/ipfs/QmZ6uBHBTN1yFRRWyiRqXAQn3eX1x6ZPK3AT2CXT1PJQ6C\"]},\"@daostack/arc/contracts/controller/Avatar.sol\":{\"keccak256\":\"0x4e4fb9d3bc21f42fbfc6a01e9f8aa483a59e9f447b0d604f55b587a81ec09ef4\",\"urls\":[\"bzz-raw://9d3c1c7575cf6075ea1d89921f09b9b8e322b208dacaf0446cd4f64506c999f0\",\"dweb:/ipfs/QmVGDDHAR2ByuQpbgV7BBKXGEAcbaWvejpEZYzHgaagBFK\"]},\"@daostack/arc/contracts/controller/ControllerInterface.sol\":{\"keccak256\":\"0x933e92612c90f292c7b59908958b003f1a13d90b97bed0572b566353c20974dc\",\"urls\":[\"bzz-raw://ce1fcf85b744fcce2dbd4205e3943e9b4ec36a5f0330d4bbf61e65f1a3e0e470\",\"dweb:/ipfs/QmUWiLkBDdekhpy93nTzBtxDHL6yNh6sTUM9G8VbsHcBzy\"]},\"@daostack/arc/contracts/controller/DAOToken.sol\":{\"keccak256\":\"0x9b213e4e3ceeffcfc1c962a43b70b8d763d8091a2dd713fc1989b97bb68786e6\",\"urls\":[\"bzz-raw://51d1d6e85fd90f45395a16b7a3c703c4636e836041f2a13f806e4222ef2e59c1\",\"dweb:/ipfs/QmQjeCeFf7TJzsYjT5scyZUDDixBA8Yy8YppgBuxcKPDnP\"]},\"@daostack/arc/contracts/globalConstraints/GlobalConstraintInterface.sol\":{\"keccak256\":\"0xc006c4591ec10b845a56e13f6791db2c428610953034686d52b2a934b6c8f36f\",\"urls\":[\"bzz-raw://19495cd88280e54d7ddcd043ffeff75e6d3777a0c42debcd61cae448e9497ea0\",\"dweb:/ipfs/QmYxWz7CgFmmddrcVXJKfob5Ktwykc2imNVUwLSR5WR8bJ\"]},\"@daostack/arc/contracts/libs/SafeERC20.sol\":{\"keccak256\":\"0xf6727d432f67046145b078f40c1cc4f6be7b0d12a6678ecaf457edf7550d244c\",\"urls\":[\"bzz-raw://5dba7734c4fed446c084a707761cbc66ba22b8b93ef53c8d4a22a76b6e271690\",\"dweb:/ipfs/QmP2VpPKUqLh4ZZs6LaxHVpCN1zCmiorygL9bMub4mbYCw\"]},\"@daostack/arc/contracts/universalSchemes/SchemeRegistrar.sol\":{\"keccak256\":\"0x13934eeba4d723347fceb4feaee0ed5a48d5d27f1b68800f0c0cc0ee91ead7c3\",\"urls\":[\"bzz-raw://911cd363dcfd942b2836969cd7a8c0a719518fafc6f5f129cc70018e17f24614\",\"dweb:/ipfs/QmWPVS5P14XAQvnG6Ccd6MSadFfbNGdqZaH9GsCLnnj3Wo\"]},\"@daostack/arc/contracts/universalSchemes/UniversalScheme.sol\":{\"keccak256\":\"0xcfdb7d336d21b3b16a31125d3bd8c88f7c4c944510f4488162247badb6411017\",\"urls\":[\"bzz-raw://d17df7fe23080da4da159c57a23793fed90dbc8129ab8d752365e6b5f07a9e2a\",\"dweb:/ipfs/QmUUNrcMqrxT3k1V4z9p9HJUnxPdNNgf5CB8NUHc5uMwBd\"]},\"@daostack/arc/contracts/universalSchemes/UniversalSchemeInterface.sol\":{\"keccak256\":\"0x956b0dbe20b6aeea74565a9204f72fba1580874d27cd63955f93e9491cabb6b1\",\"urls\":[\"bzz-raw://1bd1812db855997c2c5f3df4a0a5ae568977ac05c2066999a08ce251dce05c07\",\"dweb:/ipfs/QmRbvtTZHUnSypBqaiAUZxUbK8sGzgVpyK3f6zCz9utVDz\"]},\"@daostack/arc/contracts/votingMachines/VotingMachineCallbacks.sol\":{\"keccak256\":\"0x4052c6f57add891f5f6514a7837f54955ac1f3ad4654fa45d864e4aad19864ba\",\"urls\":[\"bzz-raw://3c41bfc9e42463f3a9c0a4a6fc75382661e1f8e04e20886ff623e7a671aa28ed\",\"dweb:/ipfs/QmXZhcp17q64esWMwWAjJ2CkjHbG9btWRMhRs78LBrVLjD\"]},\"@daostack/infra/contracts/Reputation.sol\":{\"keccak256\":\"0x3d226dac0fe7d758f0287fb28bc25fcec1f69d19888ae3a550fa49856d61c482\",\"urls\":[\"bzz-raw://8856852c8fe0ba1c9aab326f0a9a6e7f31a238de2778fa5188e6fc399f7eb352\",\"dweb:/ipfs/QmVH4ppR9Dk7v8yxaSgeArdMv9gBBVoQxEf4E3UsqQ4rY2\"]},\"@daostack/infra/contracts/libs/RealMath.sol\":{\"keccak256\":\"0x3ee79c4b483da327916ac36f9d5cc6a1f2f0363db3ad06793ec67f46e1f653db\",\"urls\":[\"bzz-raw://19b423aa16b93e414c50ca513caabc0f1cb835f31deec82d85d9bb31c0f8d5fb\",\"dweb:/ipfs/QmS8gjtT3jxxoNAosJf6QSStFAE2KZLhNA1Qq9MXwT2CnN\"]},\"@daostack/infra/contracts/votingMachines/GenesisProtocol.sol\":{\"keccak256\":\"0x0321da6019e0e1a7fc4e1ca484d7d5d376805abb17f9eb9c46a6731e9dfe58dc\",\"urls\":[\"bzz-raw://a245bc547655b1157fa33198e66fdc8470bcf20a6c56c12b2a02eec28f998849\",\"dweb:/ipfs/QmUsbHxWU5A8SJuDdKDMChu855X9KEqJjaZpTaVQG4W8Wq\"]},\"@daostack/infra/contracts/votingMachines/GenesisProtocolLogic.sol\":{\"keccak256\":\"0x2bf5fba64fbda5605b9250ea8ca6d8e28dab41fb0e2b43c9145b91e1d0425eef\",\"urls\":[\"bzz-raw://3b34c1f70c2b98d4f3add9264700f60cb3deed47610e010f3d4ac112ab107930\",\"dweb:/ipfs/QmY46SXZnKJeUmbsSfwkW1zNh1YP4FHUjAbVJUJXqhKNwV\"]},\"@daostack/infra/contracts/votingMachines/IntVoteInterface.sol\":{\"keccak256\":\"0x877991da94b1fe9c2accf69367b32fff474c4e4f7897e9cf5a61fa5d1378908f\",\"urls\":[\"bzz-raw://4ea2c35248b82ea74884313752870789de61b0bcbc14425e97192b1ef1450e5a\",\"dweb:/ipfs/QmZ9RxpmG6SsMLJm1hT9ZmVy3CVPNZyRihQxZFDk8u3w1G\"]},\"@daostack/infra/contracts/votingMachines/ProposalExecuteInterface.sol\":{\"keccak256\":\"0xb80a153793e1723b35e70ba1c3800975fbc1fae63c989cfb8134a4e58085e181\",\"urls\":[\"bzz-raw://7ea97373ca977623d4c480c1d03e0853b1b34d59df4928ef72548987b2943899\",\"dweb:/ipfs/QmZ1MmDX4ExZ1iEo9gFp3SHfpNjWoLHS9nVhFkTRokgoLS\"]},\"@daostack/infra/contracts/votingMachines/VotingMachineCallbacksInterface.sol\":{\"keccak256\":\"0xec215d305f0aa5a5193b6f0302a1aa6bb84e85460167f80b261faf9d30564563\",\"urls\":[\"bzz-raw://8edb25b20c86a28b5c7c7c3a918f219106a1d3047933984dd76e33e30911857d\",\"dweb:/ipfs/Qme1iBcLjPPrC6jMF56cSE9pmEdCQ23aT43wQbnqKjXEYe\"]},\"openzeppelin-solidity/contracts/cryptography/ECDSA.sol\":{\"keccak256\":\"0xb48974d92a87053dc1d6c5389f3d1b2ad522dec23afcb508eaa935d98dfdc0b6\",\"urls\":[\"bzz-raw://4ca542b4b005c3fa1b4e145f86cefc50cd5eb11e7df0d3b6daca5328a075f090\",\"dweb:/ipfs/QmQFNcoXCZvEPt2WWueAYvaMns16VdN6VvdPdEbUav876u\"]},\"openzeppelin-solidity/contracts/math/Math.sol\":{\"keccak256\":\"0x37605dd0606b349cfb1b679892e1bb0ef4ddc16dedb06e229cc4402610a7a848\",\"urls\":[\"bzz-raw://c44b0c7fe0523f3f9a10d2924d7d7137b1349b1e71cd4be57550e185a098ca55\",\"dweb:/ipfs/QmbBLBCBPpqna3QZTiomSwyBdtt5Ua9DqkFgYicMd7Coya\"]},\"openzeppelin-solidity/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x965012d27b4262d7a41f5028cbb30c51ebd9ecd4be8fb30380aaa7a3c64fbc8b\",\"urls\":[\"bzz-raw://1eb493553b27efd46c231a836a83ce50d215639feb97b4aac9f301d0fd034ff5\",\"dweb:/ipfs/QmbMdvSXcqGKxeeYvzF3VrWpoHQyVzMXBhzhAokF2Gdymv\"]},\"openzeppelin-solidity/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0x980de387a1a020a498f53d00f89fecebb12c949a17e8f160093c0303ede2b786\",\"urls\":[\"bzz-raw://f07a2c393caa85f62f0aaa461e3edd50aa59371d4209778ba0558d7f8b4b856c\",\"dweb:/ipfs/QmeN3ZiYGSjCnQFeYaJNgoXjF9eDue1g3e9pqManRkeBtV\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20.sol\":{\"keccak256\":\"0xba431353cb4fe70777ac026231eb5468e41aa1e81240a2b8136917acc5fff4dc\",\"urls\":[\"bzz-raw://f40c91ca270bdc9b156f339081a0fc2bbcf73cf5f62b8c73ba555df753ff6619\",\"dweb:/ipfs/QmT8y2VVjGaFdGphpcXrgvdPi2EgF9LuCDgJiJ89LvpFRV\"]},\"openzeppelin-solidity/contracts/token/ERC20/ERC20Burnable.sol\":{\"keccak256\":\"0xa3e68fd7f987c8fbdaf4867d428a69a15f3cf2f69709a5b0a0fbef750b0e6fbc\",\"urls\":[\"bzz-raw://50b1ff986d3b2793850a66c8429d9886fdfb134b1509b3e98714e3e2a71e24f5\",\"dweb:/ipfs/QmSQBYPeY9tbR3ciGRNQqvcWKnNiuxtVMq2MsPWpLwuGGm\"]},\"openzeppelin-solidity/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0x079c4e23ee448f529e43bfa3c4e8fb4be52cd0318ee923a276835bedf45b93d8\",\"urls\":[\"bzz-raw://ee762ff5b7746e41d27dcbcea00c7a3034b58adb1b45ddadddb5b721aff450df\",\"dweb:/ipfs/QmdxqtgEFZjHCoiYyz6pUAQ5iBm7As25jcyEbZoTaAgyDa\"]},\"openzeppelin-solidity/contracts/utils/Address.sol\":{\"keccak256\":\"0x5c731061b804fa256fc8c05150eafe5d20b6bb94541a8f187912bf84f7033f34\",\"urls\":[\"bzz-raw://a3c2d9f046beebab7fb41b1b124a6a124a36f510f7c67365861402ac831bdc71\",\"dweb:/ipfs/QmUtASRgitregbKH83anopLtF9vFQe3BKeAjhUa6F7t9YV\"]}},\"version\":1}",
"bytecode": "0x",
"deployedBytecode": "0x",
"sourceMap": "",
"deployedSourceMap": "",
"source": "import \"@daostack/arc/contracts/universalSchemes/SchemeRegistrar.sol\";\n\ninterface ProxyAdmin {\n function upgrade(address proxy, address impl) external;\n function upgradeAndCall(address proxy, address impl, bytes calldata callData) external payable;\n}\n\n/* @title Scheme for upgrading an upgradable contract to new impl\n* see openzeppelin upgradables\n */\ncontract UpgradeImplScheme {\n\n address public newImpl;\n address public proxy;\n address public proxyAdmin;\n bytes public callData;\n uint public timeLockHours;\n\n /* @dev constructor.\n */\n constructor(address _newImpl, address _proxy, address _proxyAdmin, bytes memory _callData, uint _timeLockHours) public {\n newImpl = _newImpl;\n proxy = _proxy;\n proxyAdmin = _proxyAdmin;\n callData = _callData;\n timeLockHours = _timeLockHours;\n }\n\n}\n\ncontract UpgradesRegistrar is SchemeRegistrar {\n struct Upgrade {\n uint timeLockEnd;\n address scheme;\n }\n\n event UpgradedImpl(address indexed proxy, address impl, bytes32 proposalId);\n\n mapping(bytes32=>Upgrade) public upgrades; \n\n /**\n * @dev execution of proposals, can only be called by the voting machine in which the vote is held.\n * @param _proposalId the ID of the voting in the voting machine\n * @param _param a parameter of the voting result, 1 yes and 2 is no.\n */\n function executeProposal(bytes32 _proposalId, int256 _param) external onlyVotingMachine(_proposalId) returns(bool) { \n Avatar avatar = proposalsInfo[msg.sender][_proposalId].avatar;\n SchemeProposal memory proposal = organizationsProposals[address(avatar)][_proposalId];\n require(proposal.scheme != address(0));\n delete organizationsProposals[address(avatar)][_proposalId];\n emit ProposalDeleted(address(avatar), _proposalId);\n if (_param == 1) {\n upgrades[_proposalId].timeLockEnd = now + UpgradeImplScheme(proposal.scheme).timeLockHours() * 1 hours;\n upgrades[_proposalId].scheme = proposal.scheme;\n executeUpgrade(_proposalId);\n }\n emit ProposalExecuted(address(avatar), _proposalId, _param);\n return true;\n }\n\n function executeUpgrade(bytes32 _proposalId) public\n {\n Upgrade memory upgrade = upgrades[_proposalId];\n if(upgrade.timeLockEnd > now) return;\n \n delete upgrades[_proposalId];\n UpgradeImplScheme updScheme = UpgradeImplScheme(upgrade.scheme);\n address proxy = updScheme.proxy();\n address proxyAdmin = updScheme.proxyAdmin();\n address newImpl = updScheme.newImpl();\n bytes memory callData = updScheme.callData();\n\n if(callData.length > 0)\n {\n ProxyAdmin(proxyAdmin).upgradeAndCall(proxy,newImpl,callData);\n }\n else {\n ProxyAdmin(proxyAdmin).upgrade(proxy,newImpl);\n }\n\n emit UpgradedImpl(proxy, newImpl, _proposalId);\n \n }\n}",
"sourcePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/UpgradesRegistrar.sol",
"ast": {
"absolutePath": "/Users/hadar/workspace/GoodDollar/GoodBootstrap/packages/contracts/contracts/dao/UpgradesRegistrar.sol",
"exportedSymbols": {
"ProxyAdmin": [
1813
],
"UpgradeImplScheme": [
1858
],
"UpgradesRegistrar": [
2063
]
},
"id": 2064,
"nodeType": "SourceUnit",
"nodes": [
{
"absolutePath": "@daostack/arc/contracts/universalSchemes/SchemeRegistrar.sol",
"file": "@daostack/arc/contracts/universalSchemes/SchemeRegistrar.sol",
"id": 1796,
"nodeType": "ImportDirective",
"scope": 2064,
"sourceUnit": 11013,
"src": "0:70:5",
"symbolAliases": [],
"unitAlias": ""
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "interface",
"documentation": null,
"fullyImplemented": false,
"id": 1813,
"linearizedBaseContracts": [
1813
],
"name": "ProxyAdmin",
"nodeType": "ContractDefinition",
"nodes": [
{
"body": null,
"documentation": null,
"id": 1803,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "upgrade",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1801,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1798,
"name": "proxy",
"nodeType": "VariableDeclaration",
"scope": 1803,
"src": "116:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1797,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "116:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1800,
"name": "impl",
"nodeType": "VariableDeclaration",
"scope": 1803,
"src": "131:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1799,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "131:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "115:30:5"
},
"returnParameters": {
"id": 1802,
"nodeType": "ParameterList",
"parameters": [],
"src": "154:0:5"
},
"scope": 1813,
"src": "99:56:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "external"
},
{
"body": null,
"documentation": null,
"id": 1812,
"implemented": false,
"kind": "function",
"modifiers": [],
"name": "upgradeAndCall",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1810,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1805,
"name": "proxy",
"nodeType": "VariableDeclaration",
"scope": 1812,
"src": "185:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1804,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "185:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1807,
"name": "impl",
"nodeType": "VariableDeclaration",
"scope": 1812,
"src": "200:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1806,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "200:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1809,
"name": "callData",
"nodeType": "VariableDeclaration",
"scope": 1812,
"src": "215:23:5",
"stateVariable": false,
"storageLocation": "calldata",
"typeDescriptions": {
"typeIdentifier": "t_bytes_calldata_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1808,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "215:5:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "184:55:5"
},
"returnParameters": {
"id": 1811,
"nodeType": "ParameterList",
"parameters": [],
"src": "257:0:5"
},
"scope": 1813,
"src": "160:98:5",
"stateMutability": "payable",
"superFunction": null,
"visibility": "external"
}
],
"scope": 2064,
"src": "72:188:5"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 1858,
"linearizedBaseContracts": [
1858
],
"name": "UpgradeImplScheme",
"nodeType": "ContractDefinition",
"nodes": [
{
"constant": false,
"id": 1815,
"name": "newImpl",
"nodeType": "VariableDeclaration",
"scope": 1858,
"src": "397:22:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1814,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "397:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 1817,
"name": "proxy",
"nodeType": "VariableDeclaration",
"scope": 1858,
"src": "425:20:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1816,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "425:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 1819,
"name": "proxyAdmin",
"nodeType": "VariableDeclaration",
"scope": 1858,
"src": "451:25:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1818,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "451:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 1821,
"name": "callData",
"nodeType": "VariableDeclaration",
"scope": 1858,
"src": "482:21:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage",
"typeString": "bytes"
},
"typeName": {
"id": 1820,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "482:5:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 1823,
"name": "timeLockHours",
"nodeType": "VariableDeclaration",
"scope": 1858,
"src": "509:25:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1822,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "509:4:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1856,
"nodeType": "Block",
"src": "693:163:5",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 1838,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1836,
"name": "newImpl",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1815,
"src": "703:7:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1837,
"name": "_newImpl",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1825,
"src": "713:8:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "703:18:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1839,
"nodeType": "ExpressionStatement",
"src": "703:18:5"
},
{
"expression": {
"argumentTypes": null,
"id": 1842,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1840,
"name": "proxy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1817,
"src": "731:5:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1841,
"name": "_proxy",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1827,
"src": "739:6:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "731:14:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1843,
"nodeType": "ExpressionStatement",
"src": "731:14:5"
},
{
"expression": {
"argumentTypes": null,
"id": 1846,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1844,
"name": "proxyAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1819,
"src": "755:10:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1845,
"name": "_proxyAdmin",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1829,
"src": "768:11:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "755:24:5",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 1847,
"nodeType": "ExpressionStatement",
"src": "755:24:5"
},
{
"expression": {
"argumentTypes": null,
"id": 1850,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1848,
"name": "callData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1821,
"src": "789:8:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage",
"typeString": "bytes storage ref"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1849,
"name": "_callData",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1831,
"src": "800:9:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes memory"
}
},
"src": "789:20:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage",
"typeString": "bytes storage ref"
}
},
"id": 1851,
"nodeType": "ExpressionStatement",
"src": "789:20:5"
},
{
"expression": {
"argumentTypes": null,
"id": 1854,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 1852,
"name": "timeLockHours",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1823,
"src": "819:13:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 1853,
"name": "_timeLockHours",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 1833,
"src": "835:14:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"src": "819:30:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"id": 1855,
"nodeType": "ExpressionStatement",
"src": "819:30:5"
}
]
},
"documentation": null,
"id": 1857,
"implemented": true,
"kind": "constructor",
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 1834,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1825,
"name": "_newImpl",
"nodeType": "VariableDeclaration",
"scope": 1857,
"src": "586:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1824,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "586:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1827,
"name": "_proxy",
"nodeType": "VariableDeclaration",
"scope": 1857,
"src": "604:14:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1826,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "604:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1829,
"name": "_proxyAdmin",
"nodeType": "VariableDeclaration",
"scope": 1857,
"src": "620:19:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1828,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "620:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1831,
"name": "_callData",
"nodeType": "VariableDeclaration",
"scope": 1857,
"src": "641:22:5",
"stateVariable": false,
"storageLocation": "memory",
"typeDescriptions": {
"typeIdentifier": "t_bytes_memory_ptr",
"typeString": "bytes"
},
"typeName": {
"id": 1830,
"name": "bytes",
"nodeType": "ElementaryTypeName",
"src": "641:5:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes_storage_ptr",
"typeString": "bytes"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1833,
"name": "_timeLockHours",
"nodeType": "VariableDeclaration",
"scope": 1857,
"src": "665:19:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1832,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "665:4:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "585:100:5"
},
"returnParameters": {
"id": 1835,
"nodeType": "ParameterList",
"parameters": [],
"src": "693:0:5"
},
"scope": 1858,
"src": "574:282:5",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
}
],
"scope": 2064,
"src": "363:496:5"
},
{
"baseContracts": [
{
"arguments": null,
"baseName": {
"contractScope": null,
"id": 1859,
"name": "SchemeRegistrar",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 11012,
"src": "891:15:5",
"typeDescriptions": {
"typeIdentifier": "t_contract$_SchemeRegistrar_$11012",
"typeString": "contract SchemeRegistrar"
}
},
"id": 1860,
"nodeType": "InheritanceSpecifier",
"src": "891:15:5"
}
],
"contractDependencies": [
11012,
11059,
11070,
11827,
16419,
16483
],
"contractKind": "contract",
"documentation": null,
"fullyImplemented": true,
"id": 2063,
"linearizedBaseContracts": [
2063,
11012,
16419,
11827,
16483,
11059,
11070
],
"name": "UpgradesRegistrar",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "UpgradesRegistrar.Upgrade",
"id": 1865,
"members": [
{
"constant": false,
"id": 1862,
"name": "timeLockEnd",
"nodeType": "VariableDeclaration",
"scope": 1865,
"src": "938:16:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
},
"typeName": {
"id": 1861,
"name": "uint",
"nodeType": "ElementaryTypeName",
"src": "938:4:5",
"typeDescriptions": {
"typeIdentifier": "t_uint256",
"typeString": "uint256"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1864,
"name": "scheme",
"nodeType": "VariableDeclaration",
"scope": 1865,
"src": "964:14:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1863,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "964:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Upgrade",
"nodeType": "StructDefinition",
"scope": 2063,
"src": "913:72:5",
"visibility": "public"
},
{
"anonymous": false,
"documentation": null,
"id": 1873,
"name": "UpgradedImpl",
"nodeType": "EventDefinition",
"parameters": {
"id": 1872,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 1867,
"indexed": true,
"name": "proxy",
"nodeType": "VariableDeclaration",
"scope": 1873,
"src": "1010:21:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1866,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1010:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1869,
"indexed": false,
"name": "impl",
"nodeType": "VariableDeclaration",
"scope": 1873,
"src": "1033:12:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 1868,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1033:7:5",
"stateMutability": "nonpayable",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 1871,
"indexed": false,
"name": "proposalId",
"nodeType": "VariableDeclaration",
"scope": 1873,
"src": "1047:18:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 1870,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1047:7:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1009:57:5"
},
"src": "991:76:5"
},
{
"constant": false,
"id": 1877,
"name": "upgrades",
"nodeType": "VariableDeclaration",
"scope": 2063,
"src": "1073:41:5",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Upgrade_$1865_storage_$",
"typeString": "mapping(bytes32 => struct UpgradesRegistrar.Upgrade)"
},
"typeName": {
"id": 1876,
"keyType": {
"id": 1874,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1081:7:5",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "1073:25:5",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_struct$_Upgrade_$1865_storage_$",
"typeString": "mapping(bytes32 => struct UpgradesRegistrar.Upgrade)"
},
"valueType": {
"contractScope": null,
"id": 1875,
"name": "Upgrade",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 1865,
"src": "1090:7:5",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Upgrade_$1865_storage_ptr",
"typeString": "struct UpgradesRegistrar.Upgrade"
}
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 1977,
"nodeType": "Block",
"src": "1496:704:5",
"statements": [
{
"assignments": [
1890
],
"declarations": [
{
"constant": false,
"id": 1890,
"name": "avatar",
"nodeType": "VariableDeclaration",
"scope": 1977,
"src": "1514:13:5",
"stateVariable": false,
"storageLocation": "default",
"typeDescrip