kleros-interaction-2
Version:
Smart contracts interacting with Kleros.
966 lines • 220 kB
JSON
{
"contractName": "VersioningProxy",
"abi": [
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "tags",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "stable",
"outputs": [
{
"name": "tag",
"type": "bytes32"
},
{
"name": "_address",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "implementation",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "bytes32"
}
],
"name": "addresses",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "_firstTag",
"type": "bytes32"
},
{
"name": "_firstAddress",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"name": "_prevTag",
"type": "bytes32"
},
{
"indexed": false,
"name": "_prevAddress",
"type": "address"
},
{
"indexed": false,
"name": "_nextTag",
"type": "bytes32"
},
{
"indexed": false,
"name": "_nextAddress",
"type": "address"
}
],
"name": "OnStableChange",
"type": "event"
},
{
"constant": false,
"inputs": [],
"name": "rollback",
"outputs": [
{
"name": "_success",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "allTags",
"outputs": [
{
"name": "_tags",
"type": "bytes32[]"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_nextTag",
"type": "bytes32"
},
{
"name": "_nextAddress",
"type": "address"
}
],
"name": "publish",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_nextTag",
"type": "bytes32"
}
],
"name": "setStable",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x608060405260008054600160a060020a0319163317905534801561002257600080fd5b506040516040806109d483398101604052805160209091015160018054600160a060020a031916600160a060020a0383161790556100698282640100000000610070810204565b505061032e565b600054600160a060020a031633146100d757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201526000805160206109b4833981519152604482015290519081900360640190fd5b60028054600181019091557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0182905560008281526003602052604090208054600160a060020a031916600160a060020a03831617905561014082640100000000610144810204565b5050565b6000805481908190600160a060020a031633146101b057604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201526000805160206109b4833981519152604482015290519081900360640190fd5b600084815260036020526040902054600160a060020a0316925082151561025e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f546865206e65787420616464726573732063616e6e6f7420626520746865207a60448201527f65726f20616464726573732e0000000000000000000000000000000000000000606482015290519081900360840190fd5b5050600480546005805460408051808201909152868152600160a060020a03868116602090920182905294879055600160a060020a03198216179091559091166102b382828686640100000000610328810204565b60408051838152600160a060020a0380841660208301528183018790528516606082015290517f4f08c95ff89163f080e17ce39ace3dcf153ad5485ff5cd5657bddbc22f116e119181900360800190a1505060018054600160a060020a031916600160a060020a039290921691909117905550565b50505050565b6106778061033d6000396000f3006080604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166320822abc811461009d57806322be3de1146100c75780635c60da1b146100fd578063682489831461012e578063699f200f146101545780638da5cb5b1461016c5780639afd9d7814610181578063d646fa4b146101aa578063e675be40146101c2575b600080fd5b3480156100a957600080fd5b506100b5600435610227565b60408051918252519081900360200190f35b3480156100d357600080fd5b506100dc610246565b60408051928352600160a060020a0390911660208301528051918290030190f35b34801561010957600080fd5b50610112610258565b60408051600160a060020a039092168252519081900360200190f35b34801561013a57600080fd5b50610152600435600160a060020a0360243516610267565b005b34801561016057600080fd5b5061011260043561033a565b34801561017857600080fd5b50610112610355565b34801561018d57600080fd5b50610196610364565b604080519115158252519081900360200190f35b3480156101b657600080fd5b50610152600435610413565b3480156101ce57600080fd5b506101d76105ec565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102135781810151838201526020016101fb565b505050509050019250505060405180910390f35b600280548290811061023557fe5b600091825260209091200154905081565b600454600554600160a060020a031682565b600154600160a060020a031681565b600054600160a060020a031633146102c9576040805160e560020a62461bcd02815260206004820181905260248201527f43616e206f6e6c792062652063616c6c656420627920746865206f776e65722e604482015290519081900360640190fd5b60028054600181019091557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace018290556000828152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03831617905561033682610413565b5050565b600360205260009081526040902054600160a060020a031681565b600054600160a060020a031681565b6000805481908190600160a060020a031633146103cb576040805160e560020a62461bcd02815260206004820181905260248201527f43616e206f6e6c792062652063616c6c656420627920746865206f776e65722e604482015290519081900360640190fd5b6002805492508210156103e1576000925061040e565b6002805460011984019081106103f357fe5b9060005260206000200154905061040981610413565b600192505b505090565b6000805481908190600160a060020a0316331461047a576040805160e560020a62461bcd02815260206004820181905260248201527f43616e206f6e6c792062652063616c6c656420627920746865206f776e65722e604482015290519081900360640190fd5b600084815260036020526040902054600160a060020a03169250821515610511576040805160e560020a62461bcd02815260206004820152602c60248201527f546865206e65787420616464726573732063616e6e6f7420626520746865207a60448201527f65726f20616464726573732e0000000000000000000000000000000000000000606482015290519081900360840190fd5b5050600480546005805460408051808201909152868152600160a060020a0386811660209092018290529487905573ffffffffffffffffffffffffffffffffffffffff1982161790915590911661056a82828686610645565b60408051838152600160a060020a0380841660208301528183018790528516606082015290517f4f08c95ff89163f080e17ce39ace3dcf153ad5485ff5cd5657bddbc22f116e119181900360800190a150506001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905550565b6060600280548060200260200160405190810160405280929190818152602001828054801561063b57602002820191906000526020600020905b81548152600190910190602001808311610626575b5050505050905090565b505050505600a165627a7a72305820e055b2f4f5b93121b8b3bf4c20b1ea8fbd9499951205323b8dd0037381300d4d002943616e206f6e6c792062652063616c6c656420627920746865206f776e65722e",
"deployedBytecode": "0x6080604052600436106100985763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166320822abc811461009d57806322be3de1146100c75780635c60da1b146100fd578063682489831461012e578063699f200f146101545780638da5cb5b1461016c5780639afd9d7814610181578063d646fa4b146101aa578063e675be40146101c2575b600080fd5b3480156100a957600080fd5b506100b5600435610227565b60408051918252519081900360200190f35b3480156100d357600080fd5b506100dc610246565b60408051928352600160a060020a0390911660208301528051918290030190f35b34801561010957600080fd5b50610112610258565b60408051600160a060020a039092168252519081900360200190f35b34801561013a57600080fd5b50610152600435600160a060020a0360243516610267565b005b34801561016057600080fd5b5061011260043561033a565b34801561017857600080fd5b50610112610355565b34801561018d57600080fd5b50610196610364565b604080519115158252519081900360200190f35b3480156101b657600080fd5b50610152600435610413565b3480156101ce57600080fd5b506101d76105ec565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102135781810151838201526020016101fb565b505050509050019250505060405180910390f35b600280548290811061023557fe5b600091825260209091200154905081565b600454600554600160a060020a031682565b600154600160a060020a031681565b600054600160a060020a031633146102c9576040805160e560020a62461bcd02815260206004820181905260248201527f43616e206f6e6c792062652063616c6c656420627920746865206f776e65722e604482015290519081900360640190fd5b60028054600181019091557f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace018290556000828152600360205260409020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03831617905561033682610413565b5050565b600360205260009081526040902054600160a060020a031681565b600054600160a060020a031681565b6000805481908190600160a060020a031633146103cb576040805160e560020a62461bcd02815260206004820181905260248201527f43616e206f6e6c792062652063616c6c656420627920746865206f776e65722e604482015290519081900360640190fd5b6002805492508210156103e1576000925061040e565b6002805460011984019081106103f357fe5b9060005260206000200154905061040981610413565b600192505b505090565b6000805481908190600160a060020a0316331461047a576040805160e560020a62461bcd02815260206004820181905260248201527f43616e206f6e6c792062652063616c6c656420627920746865206f776e65722e604482015290519081900360640190fd5b600084815260036020526040902054600160a060020a03169250821515610511576040805160e560020a62461bcd02815260206004820152602c60248201527f546865206e65787420616464726573732063616e6e6f7420626520746865207a60448201527f65726f20616464726573732e0000000000000000000000000000000000000000606482015290519081900360840190fd5b5050600480546005805460408051808201909152868152600160a060020a0386811660209092018290529487905573ffffffffffffffffffffffffffffffffffffffff1982161790915590911661056a82828686610645565b60408051838152600160a060020a0380841660208301528183018790528516606082015290517f4f08c95ff89163f080e17ce39ace3dcf153ad5485ff5cd5657bddbc22f116e119181900360800190a150506001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039290921691909117905550565b6060600280548060200260200160405190810160405280929190818152602001828054801561063b57602002820191906000526020600020905b81548152600190910190602001808311610626575b5050505050905090565b505050505600a165627a7a72305820e055b2f4f5b93121b8b3bf4c20b1ea8fbd9499951205323b8dd0037381300d4d0029",
"sourceMap": "226:4609:51:-;;;913:33;;;-1:-1:-1;;;;;;913:33:51;936:10;913:33;;;1800:151;5:2:-1;;;;30:1;27;20:12;5:2;1800:151:51;;;;;;;;;;;;;;;;;;;1871:14;:30;;-1:-1:-1;;;;;;1871:30:51;-1:-1:-1;;;;;1871:30:51;;;;;1911:33;1800:151;;1911:7;;;;:33;:::i;:::-;1800:151;;226:4609;;3041:264;1346:5;;-1:-1:-1;;;;;1346:5:51;1355:10;1346:19;1338:64;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1338:64:51;;;;;;;;;;;;;;;3144:4;27:10:-1;;39:1;23:18;;45:23;;;3144:19:51;;;;;-1:-1:-1;3190:19:51;;;:9;3144:19;3190;;;;:34;;-1:-1:-1;;;;;;3190:34:51;-1:-1:-1;;;;;3190:34:51;;;;;3279:19;3144;3279:9;;;;:19;:::i;:::-;3041:264;;:::o;3458:780::-;3583:19;1346:5;;3583:19;;;;-1:-1:-1;;;;;1346:5:51;1355:10;1346:19;1338:64;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1338:64:51;;;;;;;;;;;;;;;3605:19;;;;:9;:19;;;;;;-1:-1:-1;;;;;3605:19:51;;-1:-1:-1;3642:25:51;;;3634:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3798:6:51;:10;;3840:15;;;3899:50;;;;;;;;;;;;-1:-1:-1;;;;;3899:50:51;;;;;;;;;;3890:59;;;;-1:-1:-1;;;;;;3890:59:51;;;;;;3798:10;;3840:15;3999:63;3798:10;3840:15;3916:8;3936:11;3999:18;;;;:63;:::i;:::-;4089:59;;;;;;-1:-1:-1;;;;;4089:59:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4203:14:51;:28;;-1:-1:-1;;;;;;4203:28:51;-1:-1:-1;;;;;4203:28:51;;;;;;;;;;-1:-1:-1;3458:780:51:o;4715:118::-;;;;;:::o;226:4609::-;;;;;;;",
"deployedSourceMap": "226:4609:51:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1040:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1040:21:51;;;;;;;;;;;;;;;;;;;;;1166:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1166:24:51;;;;;;;;;;;-1:-1:-1;;;;;1166:24:51;;;;;;;;;;;;;;;;972:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;972:29:51;;;;;;;;-1:-1:-1;;;;;972:29:51;;;;;;;;;;;;;;3041:264;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3041:264:51;;;-1:-1:-1;;;;;3041:264:51;;;;;;;1115:45;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1115:45:51;;;;;913:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;913:33:51;;;;2211:344;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2211:344:51;;;;;;;;;;;;;;;;;;;;;;3458:780;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;3458:780:51;;;;;2702:86;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2702:86:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;2702:86:51;;;;;;;;;;;;;;;;;1040:21;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1040:21:51;:::o;1166:24::-;;;;;-1:-1:-1;;;;;1166:24:51;;:::o;972:29::-;;;-1:-1:-1;;;;;972:29:51;;:::o;3041:264::-;1346:5;;-1:-1:-1;;;;;1346:5:51;1355:10;1346:19;1338:64;;;;;-1:-1:-1;;;;;1338:64:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3144:4;27:10:-1;;39:1;23:18;;45:23;;;3144:19:51;;;;;-1:-1:-1;3190:19:51;;;:9;3144:19;3190;;;;:34;;-1:-1:-1;;3190:34:51;-1:-1:-1;;;;;3190:34:51;;;;;3279:19;3144;3279:9;:19::i;:::-;3041:264;;:::o;1115:45::-;;;;;;;;;;;;-1:-1:-1;;;;;1115:45:51;;:::o;913:33::-;;;-1:-1:-1;;;;;913:33:51;;:::o;2211:344::-;2258:13;1346:5;;2258:13;;;;-1:-1:-1;;;;;1346:5:51;1355:10;1346:19;1338:64;;;;;-1:-1:-1;;;;;1338:64:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2301:4;:11;;;-1:-1:-1;2326:11:51;;2322:94;;;2411:5;2404:12;;;;2322:94;2482:4;:17;;-1:-1:-1;;2487:11:51;;;2482:17;;;;;;;;;;;;;;2464:35;;2509:18;2519:7;2509:9;:18::i;:::-;2544:4;2537:11;;1412:1;2211:344;;;:::o;3458:780::-;3583:19;1346:5;;3583:19;;;;-1:-1:-1;;;;;1346:5:51;1355:10;1346:19;1338:64;;;;;-1:-1:-1;;;;;1338:64:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3605:19;;;;:9;:19;;;;;;-1:-1:-1;;;;;3605:19:51;;-1:-1:-1;3642:25:51;;;3634:82;;;;;-1:-1:-1;;;;;3634:82:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;3798:6:51;:10;;3840:15;;;3899:50;;;;;;;;;;;;-1:-1:-1;;;;;3899:50:51;;;;;;;;;;3890:59;;;;-1:-1:-1;;3890:59:51;;;;;;3798:10;;3840:15;3999:63;3798:10;3840:15;3916:8;3936:11;3999:18;:63::i;:::-;4089:59;;;;;;-1:-1:-1;;;;;4089:59:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;4203:14:51;:28;;-1:-1:-1;;4203:28:51;-1:-1:-1;;;;;4203:28:51;;;;;;;;;;-1:-1:-1;3458:780:51:o;2702:86::-;2743:15;2777:4;2770:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2702:86;:::o;4715:118::-;;;;;:::o",
"source": "pragma solidity ^0.4.15;\n\n/**\n * @title VersioningProxy\n * @author Enrique Piqueras - <epiquerass@gmail.com>\n * @notice A base contract for managing the deployment of versions of another contract, the managed contract.\n */\ncontract VersioningProxy {\n /* Structs */\n\n struct Deployment {\n bytes32 tag;\n address _address;\n }\n\n /* Events */\n\n /**\n * @notice Called whenever 'stable' changes for off-chain handling.\n * @param _prevTag The previous 'stable' managed contract version tag.\n * @param _prevAddress The previous 'stable' managed contract address.\n * @param _nextTag The next 'stable' managed contract version tag.\n * @param _nextAddress The next 'stable' managed contract address.\n */\n event OnStableChange(bytes32 _prevTag, address _prevAddress, bytes32 _nextTag, address _nextAddress);\n\n /* Storage */\n\n // Owner and Creation Metadata\n address public owner = msg.sender;\n\n // Deployments\n address public implementation; // Proxy standard target address\n bytes32[] public tags; // We keep this so we can iterate over versions\n mapping (bytes32 => address) public addresses;\n Deployment public stable;\n\n /* Modifiers */\n\n /**\n * @dev Makes a function only callable by the owner of this contract.\n */\n modifier onlyOwner {\n require(owner == msg.sender, \"Can only be called by the owner.\");\n _;\n }\n\n /* Constructor */\n\n /**\n * @notice Constructs the versioning proxy with the proxy eternal storage flag and the first version of the managed contract, `firstTag`, at `firstAddress`.\n * @param _firstTag The version tag of the first version of the managed contract.\n * @param _firstAddress The address of the first verion of the managed contract.\n */\n constructor(bytes32 _firstTag, address _firstAddress) public {\n implementation = _firstAddress;\n publish(_firstTag, _firstAddress);\n }\n\n /* External */\n\n /**\n * @notice Rolls back 'stable' to the previous deployment, and returns true, if one exists, returns false otherwise.\n * @return True if there was a previous version and the rollback succeeded, false otherwise.\n */\n function rollback() external onlyOwner returns(bool _success) {\n uint256 tagsLen = tags.length;\n if (tagsLen < 2) // We don't have a previous deployment, return false\n return false;\n\n // Roll back and return true\n bytes32 prevTag = tags[tagsLen - 2];\n setStable(prevTag);\n return true;\n }\n\n /* External Views */\n\n /**\n * @notice Returns all deployed version tags.\n * @return All of the deployed version tags.\n */\n function allTags() external view returns(bytes32[] _tags) {\n return tags;\n }\n\n /* Public */\n\n /**\n * @notice Publishes the next version of the managed contract, `nextTag`, at `nextAddress`.\n * @param _nextTag The next version tag.\n * @param _nextAddress The next address of the managed contract.\n */\n function publish(bytes32 _nextTag, address _nextAddress) public onlyOwner {\n // Publish\n tags.push(_nextTag); // Push next tag\n addresses[_nextTag] = _nextAddress; // Set next address\n\n // Set 'stable'\n setStable(_nextTag);\n }\n\n /**\n * @notice Sets the value of 'stable' to the address of `nextTag`.\n * @param _nextTag The already published version tag.\n */\n function setStable(bytes32 _nextTag) public onlyOwner {\n // Make sure this version has already been published\n address nextAddress = addresses[_nextTag];\n require(nextAddress != address(0), \"The next address cannot be the zero address.\");\n\n // Save current tag and address for handlers\n bytes32 prevTag = stable.tag;\n address prevAddress = stable._address;\n\n // Set 'stable'\n stable = Deployment({tag: _nextTag, _address: nextAddress});\n\n // Call handler and fire event\n handleStableChange(prevTag, prevAddress, _nextTag, nextAddress); // on-chain\n emit OnStableChange(prevTag, prevAddress, _nextTag, nextAddress); // off-chain\n\n // Change proxy target\n implementation = nextAddress;\n }\n\n /* Private */\n\n /**\n * @notice Called whenever 'stable' changes for on-chain handling.\n * @dev Overwrite this function to handle 'stable' changes on-chain.\n * @param _prevTag The previous 'stable' managed contract version tag.\n * @param _prevAddress The previous 'stable' managed contract address.\n * @param _nextTag The next 'stable' managed contract version tag.\n * @param _nextAddress The next 'stable' managed contract address.\n */\n function handleStableChange(bytes32 _prevTag, address _prevAddress, bytes32 _nextTag, address _nextAddress) private {}\n}\n",
"sourcePath": "/private/tmp/kleros-interaction/contracts/standard/proxy/VersioningProxy.sol",
"ast": {
"absolutePath": "/private/tmp/kleros-interaction/contracts/standard/proxy/VersioningProxy.sol",
"exportedSymbols": {
"VersioningProxy": [
18193
]
},
"id": 18194,
"nodeType": "SourceUnit",
"nodes": [
{
"id": 17995,
"literals": [
"solidity",
"^",
"0.4",
".15"
],
"nodeType": "PragmaDirective",
"src": "0:24:51"
},
{
"baseContracts": [],
"contractDependencies": [],
"contractKind": "contract",
"documentation": " @title VersioningProxy\n @author Enrique Piqueras - <epiquerass@gmail.com>\n @notice A base contract for managing the deployment of versions of another contract, the managed contract.",
"fullyImplemented": true,
"id": 18193,
"linearizedBaseContracts": [
18193
],
"name": "VersioningProxy",
"nodeType": "ContractDefinition",
"nodes": [
{
"canonicalName": "VersioningProxy.Deployment",
"id": 18000,
"members": [
{
"constant": false,
"id": 17997,
"name": "tag",
"nodeType": "VariableDeclaration",
"scope": 18000,
"src": "304:11:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 17996,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "304:7:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 17999,
"name": "_address",
"nodeType": "VariableDeclaration",
"scope": 18000,
"src": "325:16:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 17998,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "325:7:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"name": "Deployment",
"nodeType": "StructDefinition",
"scope": 18193,
"src": "276:72:51",
"visibility": "public"
},
{
"anonymous": false,
"documentation": "@notice Called whenever 'stable' changes for off-chain handling.\n@param _prevTag The previous 'stable' managed contract version tag.\n@param _prevAddress The previous 'stable' managed contract address.\n@param _nextTag The next 'stable' managed contract version tag.\n@param _nextAddress The next 'stable' managed contract address.",
"id": 18010,
"name": "OnStableChange",
"nodeType": "EventDefinition",
"parameters": {
"id": 18009,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18002,
"indexed": false,
"name": "_prevTag",
"nodeType": "VariableDeclaration",
"scope": 18010,
"src": "773:16:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 18001,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "773:7:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 18004,
"indexed": false,
"name": "_prevAddress",
"nodeType": "VariableDeclaration",
"scope": 18010,
"src": "791:20:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18003,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "791:7:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 18006,
"indexed": false,
"name": "_nextTag",
"nodeType": "VariableDeclaration",
"scope": 18010,
"src": "813:16:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 18005,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "813:7:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 18008,
"indexed": false,
"name": "_nextAddress",
"nodeType": "VariableDeclaration",
"scope": 18010,
"src": "831:20:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18007,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "831:7:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "772:80:51"
},
"src": "752:101:51"
},
{
"constant": false,
"id": 18014,
"name": "owner",
"nodeType": "VariableDeclaration",
"scope": 18193,
"src": "913:33:51",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18011,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "913:7:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 18012,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20639,
"src": "936:3:51",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 18013,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "936:10:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"visibility": "public"
},
{
"constant": false,
"id": 18016,
"name": "implementation",
"nodeType": "VariableDeclaration",
"scope": 18193,
"src": "972:29:51",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18015,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "972:7:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 18019,
"name": "tags",
"nodeType": "VariableDeclaration",
"scope": 18193,
"src": "1040:21:51",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_storage",
"typeString": "bytes32[]"
},
"typeName": {
"baseType": {
"id": 18017,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1040:7:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"id": 18018,
"length": null,
"nodeType": "ArrayTypeName",
"src": "1040:9:51",
"typeDescriptions": {
"typeIdentifier": "t_array$_t_bytes32_$dyn_storage_ptr",
"typeString": "bytes32[]"
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 18023,
"name": "addresses",
"nodeType": "VariableDeclaration",
"scope": 18193,
"src": "1115:45:51",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
},
"typeName": {
"id": 18022,
"keyType": {
"id": 18020,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1124:7:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"nodeType": "Mapping",
"src": "1115:28:51",
"typeDescriptions": {
"typeIdentifier": "t_mapping$_t_bytes32_$_t_address_$",
"typeString": "mapping(bytes32 => address)"
},
"valueType": {
"id": 18021,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1135:7:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
},
"value": null,
"visibility": "public"
},
{
"constant": false,
"id": 18025,
"name": "stable",
"nodeType": "VariableDeclaration",
"scope": 18193,
"src": "1166:24:51",
"stateVariable": true,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Deployment_$18000_storage",
"typeString": "struct VersioningProxy.Deployment"
},
"typeName": {
"contractScope": null,
"id": 18024,
"name": "Deployment",
"nodeType": "UserDefinedTypeName",
"referencedDeclaration": 18000,
"src": "1166:10:51",
"typeDescriptions": {
"typeIdentifier": "t_struct$_Deployment_$18000_storage_ptr",
"typeString": "struct VersioningProxy.Deployment"
}
},
"value": null,
"visibility": "public"
},
{
"body": {
"id": 18036,
"nodeType": "Block",
"src": "1328:92:51",
"statements": [
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"commonType": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"id": 18031,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftExpression": {
"argumentTypes": null,
"id": 18028,
"name": "owner",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18014,
"src": "1346:5:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "BinaryOperation",
"operator": "==",
"rightExpression": {
"argumentTypes": null,
"expression": {
"argumentTypes": null,
"id": 18029,
"name": "msg",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 20639,
"src": "1355:3:51",
"typeDescriptions": {
"typeIdentifier": "t_magic_message",
"typeString": "msg"
}
},
"id": 18030,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"memberName": "sender",
"nodeType": "MemberAccess",
"referencedDeclaration": null,
"src": "1355:10:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1346:19:51",
"typeDescriptions": {
"typeIdentifier": "t_bool",
"typeString": "bool"
}
},
{
"argumentTypes": null,
"hexValue": "43616e206f6e6c792062652063616c6c656420627920746865206f776e65722e",
"id": 18032,
"isConstant": false,
"isLValue": false,
"isPure": true,
"kind": "string",
"lValueRequested": false,
"nodeType": "Literal",
"src": "1367:34:51",
"subdenomination": null,
"typeDescriptions": {
"typeIdentifier": "t_stringliteral_bf33d29683e5562cfb7e5d7016dc68533d604c99c45e8c622ac0ad8361611bfa",
"typeString": "literal_string \"Can only be called by the owner.\""
},
"value": "Can only be called by the owner."
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bool",
"typeString": "bool"
},
{
"typeIdentifier": "t_stringliteral_bf33d29683e5562cfb7e5d7016dc68533d604c99c45e8c622ac0ad8361611bfa",
"typeString": "literal_string \"Can only be called by the owner.\""
}
],
"id": 18027,
"name": "require",
"nodeType": "Identifier",
"overloadedDeclarations": [
20642,
20643
],
"referencedDeclaration": 20643,
"src": "1338:7:51",
"typeDescriptions": {
"typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
"typeString": "function (bool,string memory) pure"
}
},
"id": 18033,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1338:64:51",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 18034,
"nodeType": "ExpressionStatement",
"src": "1338:64:51"
},
{
"id": 18035,
"nodeType": "PlaceholderStatement",
"src": "1412:1:51"
}
]
},
"documentation": " @dev Makes a function only callable by the owner of this contract.",
"id": 18037,
"name": "onlyOwner",
"nodeType": "ModifierDefinition",
"parameters": {
"id": 18026,
"nodeType": "ParameterList",
"parameters": [],
"src": "1328:0:51"
},
"src": "1309:111:51",
"visibility": "internal"
},
{
"body": {
"id": 18053,
"nodeType": "Block",
"src": "1861:90:51",
"statements": [
{
"expression": {
"argumentTypes": null,
"id": 18046,
"isConstant": false,
"isLValue": false,
"isPure": false,
"lValueRequested": false,
"leftHandSide": {
"argumentTypes": null,
"id": 18044,
"name": "implementation",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18016,
"src": "1871:14:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"nodeType": "Assignment",
"operator": "=",
"rightHandSide": {
"argumentTypes": null,
"id": 18045,
"name": "_firstAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18041,
"src": "1888:13:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"src": "1871:30:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"id": 18047,
"nodeType": "ExpressionStatement",
"src": "1871:30:51"
},
{
"expression": {
"argumentTypes": null,
"arguments": [
{
"argumentTypes": null,
"id": 18049,
"name": "_firstTag",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18039,
"src": "1919:9:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
{
"argumentTypes": null,
"id": 18050,
"name": "_firstAddress",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18041,
"src": "1930:13:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
}
],
"expression": {
"argumentTypes": [
{
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
{
"typeIdentifier": "t_address",
"typeString": "address"
}
],
"id": 18048,
"name": "publish",
"nodeType": "Identifier",
"overloadedDeclarations": [],
"referencedDeclaration": 18122,
"src": "1911:7:51",
"typeDescriptions": {
"typeIdentifier": "t_function_internal_nonpayable$_t_bytes32_$_t_address_$returns$__$",
"typeString": "function (bytes32,address)"
}
},
"id": 18051,
"isConstant": false,
"isLValue": false,
"isPure": false,
"kind": "functionCall",
"lValueRequested": false,
"names": [],
"nodeType": "FunctionCall",
"src": "1911:33:51",
"typeDescriptions": {
"typeIdentifier": "t_tuple$__$",
"typeString": "tuple()"
}
},
"id": 18052,
"nodeType": "ExpressionStatement",
"src": "1911:33:51"
}
]
},
"documentation": " @notice Constructs the versioning proxy with the proxy eternal storage flag and the first version of the managed contract, `firstTag`, at `firstAddress`.\n @param _firstTag The version tag of the first version of the managed contract.\n @param _firstAddress The address of the first verion of the managed contract.",
"id": 18054,
"implemented": true,
"isConstructor": true,
"isDeclaredConst": false,
"modifiers": [],
"name": "",
"nodeType": "FunctionDefinition",
"parameters": {
"id": 18042,
"nodeType": "ParameterList",
"parameters": [
{
"constant": false,
"id": 18039,
"name": "_firstTag",
"nodeType": "VariableDeclaration",
"scope": 18054,
"src": "1812:17:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
},
"typeName": {
"id": 18038,
"name": "bytes32",
"nodeType": "ElementaryTypeName",
"src": "1812:7:51",
"typeDescriptions": {
"typeIdentifier": "t_bytes32",
"typeString": "bytes32"
}
},
"value": null,
"visibility": "internal"
},
{
"constant": false,
"id": 18041,
"name": "_firstAddress",
"nodeType": "VariableDeclaration",
"scope": 18054,
"src": "1831:21:51",
"stateVariable": false,
"storageLocation": "default",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
},
"typeName": {
"id": 18040,
"name": "address",
"nodeType": "ElementaryTypeName",
"src": "1831:7:51",
"typeDescriptions": {
"typeIdentifier": "t_address",
"typeString": "address"
}
},
"value": null,
"visibility": "internal"
}
],
"src": "1811:42:51"
},
"payable": false,
"returnParameters": {
"id": 18043,
"nodeType": "ParameterList",
"parameters": [],
"src": "1861:0:51"
},
"scope": 18193,
"src": "1800:151:51",
"stateMutability": "nonpayable",
"superFunction": null,
"visibility": "public"
},
{
"body": {
"i