{"contractName":"OwnedUpgradeabilityProxy","abi":[{"constant":true,"inputs":[],"name":"proxyType","outputs":[{"name":"proxyTypeId","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"name":"impl","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousOwner","type":"address"},{"indexed":false,"name":"newOwner","type":"address"}],"name":"ProxyOwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"constant":true,"inputs":[],"name":"proxyOwner","outputs":[{"name":"owner","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferProxyOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"implementation","type":"address"}],"name":"upgradeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"implementation","type":"address"},{"name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"payable":true,"stateMutability":"payable","type":"function"}],"bytecode":"0x608060405234801561001057600080fd5b506100293361002e640100000000026401000000009004565b61006f565b600060405180807f6f72672e6d65726964696f2e70726f78792e6f776e65720000000000000000008152506017019050604051809103902090508181555050565b6108608061007e6000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025313a2146100e75780633659cfe61461013e5780634555d5c9146101815780634f1ef286146101ac5780635c60da1b14610228578063f1739cae1461027f575b60006100826102c2565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156100c057600080fd5b60405136600082376000803683855af43d806000843e81600081146100e3578184f35b8184fd5b3480156100f357600080fd5b506100fc610305565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014a57600080fd5b5061017f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610348565b005b34801561018d57600080fd5b506101966103fe565b6040518082815260200191505060405180910390f35b610226600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610441565b005b34801561023457600080fd5b5061023d6102c2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028b57600080fd5b506102c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061058b565b005b60008060405180807f6f72672e6d65726964696f2e70726f78792e696d706c656d656e746174696f6e815250602001905060405180910390209050805491505090565b60008060405180807f6f72672e6d65726964696f2e70726f78792e6f776e6572000000000000000000815250601701905060405180910390209050805491505090565b610350610305565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156103f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4d7573742062652070726f7879204f776e65720000000000000000000000000081525060200191505060405180910390fd5b6103fb8161071b565b50565b60008060405180807f6f72672e6d65726964696f2e70726f78792e7479706549640000000000000000815250601801905060405180910390209050805491505090565b610449610305565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4d7573742062652070726f7879204f776e65720000000000000000000000000081525060200191505060405180910390fd5b6104f482610348565b3073ffffffffffffffffffffffffffffffffffffffff16348260405180828051906020019080838360005b8381101561053a57808201518184015260208101905061051f565b50505050905090810190601f1680156105675780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af192505050151561058757600080fd5b5050565b610593610305565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610635576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4d7573742062652070726f7879204f776e65720000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561067157600080fd5b7f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd961069a610305565b82604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1610718816107b2565b50565b60006107256102c2565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561076257600080fd5b61076b826107f3565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25050565b600060405180807f6f72672e6d65726964696f2e70726f78792e6f776e65720000000000000000008152506017019050604051809103902090508181555050565b600060405180807f6f72672e6d65726964696f2e70726f78792e696d706c656d656e746174696f6e81525060200190506040518091039020905081815550505600a165627a7a7230582029f12531357c3b5a948ced1d63a3a25dce6b7361acd93f95415238575b6df69e0029","deployedBytecode":"0x608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063025313a2146100e75780633659cfe61461013e5780634555d5c9146101815780634f1ef286146101ac5780635c60da1b14610228578063f1739cae1461027f575b60006100826102c2565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156100c057600080fd5b60405136600082376000803683855af43d806000843e81600081146100e3578184f35b8184fd5b3480156100f357600080fd5b506100fc610305565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561014a57600080fd5b5061017f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610348565b005b34801561018d57600080fd5b506101966103fe565b6040518082815260200191505060405180910390f35b610226600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610441565b005b34801561023457600080fd5b5061023d6102c2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561028b57600080fd5b506102c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061058b565b005b60008060405180807f6f72672e6d65726964696f2e70726f78792e696d706c656d656e746174696f6e815250602001905060405180910390209050805491505090565b60008060405180807f6f72672e6d65726964696f2e70726f78792e6f776e6572000000000000000000815250601701905060405180910390209050805491505090565b610350610305565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156103f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4d7573742062652070726f7879204f776e65720000000000000000000000000081525060200191505060405180910390fd5b6103fb8161071b565b50565b60008060405180807f6f72672e6d65726964696f2e70726f78792e7479706549640000000000000000815250601801905060405180910390209050805491505090565b610449610305565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4d7573742062652070726f7879204f776e65720000000000000000000000000081525060200191505060405180910390fd5b6104f482610348565b3073ffffffffffffffffffffffffffffffffffffffff16348260405180828051906020019080838360005b8381101561053a57808201518184015260208101905061051f565b50505050905090810190601f1680156105675780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af192505050151561058757600080fd5b5050565b610593610305565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610635576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4d7573742062652070726f7879204f776e65720000000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561067157600080fd5b7f5a3e66efaa1e445ebd894728a69d6959842ea1e97bd79b892797106e270efcd961069a610305565b82604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1610718816107b2565b50565b60006107256102c2565b90508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561076257600080fd5b61076b826107f3565b8173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25050565b600060405180807f6f72672e6d65726964696f2e70726f78792e6f776e65720000000000000000008152506017019050604051809103902090508181555050565b600060405180807f6f72672e6d65726964696f2e70726f78792e696d706c656d656e746174696f6e81525060200190506040518091039020905081815550505600a165627a7a7230582029f12531357c3b5a948ced1d63a3a25dce6b7361acd93f95415238575b6df69e0029","source":"pragma solidity 0.4.24;\n\nimport \"./UpgradeabilityProxy.sol\";\n\n/**\n * @title OwnedUpgradeabilityProxy\n * @dev This contract combines an upgradeability proxy with basic authorization control functionalities\n * @dev source https://github.com/zeppelinos/labs/blob/master/upgradeability_using_unstructured_storage/contracts/OwnedUpgradeabilityProxy.sol\n * @dev implementation notes:\n *         - constructors will not work, the proxied contract must be initialized after proxying.  That is what the upgradeToAndCall function is for.\n *         - if you do not inherit your version n-1 into version n, you will overwrite memory slots with the new contract.\n *         - if you inherit version n-1 into version n, you will preserve memory slots including the _initialized flag.\n *         - Therefore each new contract that needs to be initialized should have its own _initialized flag and function.\n */\ncontract OwnedUpgradeabilityProxy is UpgradeabilityProxy {\n    /**\n    * @dev Event to show ownership has been transferred\n    * @param previousOwner representing the address of the previous owner\n    * @param newOwner representing the address of the new owner\n    */\n    event ProxyOwnershipTransferred(address previousOwner, address newOwner);\n\n    // Storage position of the owner of the contract\n    bytes32 private constant proxyOwnerPosition = keccak256(\"org.meridio.proxy.owner\");\n\n    /**\n    * @dev the constructor sets the original owner of the contract to the sender account.\n    */\n    constructor() public {\n        setUpgradeabilityOwner(msg.sender);\n    }\n\n    /**\n    * @dev Throws if called by any account other than the owner.\n    */\n    modifier onlyProxyOwner() {\n        require(msg.sender == proxyOwner(), \"Must be proxy Owner\");\n        _;\n    }\n\n    /**\n    * @dev Tells the address of the owner\n    * @return the address of the owner\n    */\n    function proxyOwner() public view returns (address owner) {\n        bytes32 position = proxyOwnerPosition;\n        assembly { // solhint-disable-line\n          owner := sload(position)\n        }\n    }\n\n    /**\n    * @dev Sets the address of the owner\n    */\n    function setUpgradeabilityOwner(address newProxyOwner) internal {\n        bytes32 position = proxyOwnerPosition;\n        assembly { // solhint-disable-line\n          sstore(position, newProxyOwner)\n        }\n    }\n\n    /**\n    * @dev Allows the current owner to transfer control of the contract to a newOwner.\n    * @param newOwner The address to transfer ownership to.\n    */\n    function transferProxyOwnership(address newOwner) \n        public \n        onlyProxyOwner \n    {\n        require(newOwner != address(0));\n        emit ProxyOwnershipTransferred(proxyOwner(), newOwner);\n        setUpgradeabilityOwner(newOwner);\n    }\n\n    /**\n    * @dev Allows the proxy owner to upgrade the current version of the proxy.\n    * @param implementation representing the address of the new implementation to be set.\n    */\n    function upgradeTo(address implementation) public onlyProxyOwner {\n        _upgradeTo(implementation);\n    }\n\n    /**\n    * @dev Allows the proxy owner to upgrade the current version of the proxy and call the new implementation\n    * to initialize whatever is needed through a low level call.\n    * @param implementation representing the address of the new implementation to be set.\n    * @param data represents the msg.data to bet sent in the low level call. This parameter may include the function\n    * signature of the implementation to be called with the needed payload\n    */\n    function upgradeToAndCall(address implementation, bytes data) payable public onlyProxyOwner {\n        upgradeTo(implementation);\n        require(address(this).call.value(msg.value)(data)); // solhint-disable-line no-call-value\n    }\n}","compiler":{"name":"solc","version":"0.4.24+commit.e67f0147.Emscripten.clang"},"networks":{},"schemaVersion":"2.0.1","updatedAt":"2018-09-15T00:49:31.872Z"}