{
  "abi": [
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "_initialImplementation",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "_controller",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "implementation",
          "type": "address"
        }
      ],
      "name": "Upgrade",
      "type": "event"
    },
    {
      "stateMutability": "payable",
      "type": "fallback"
    }
  ],
  "bytecode": {
    "object": "0x60a060405234801561001057600080fd5b506040516103513803806103518339818101604052604081101561003357600080fd5b5080516020909101516100458261005b565b60601b6001600160601b0319166080525061015b565b6000546001600160a01b03828116911614156100a9576040805162461bcd60e51b8152602060048201526008602482015267217570677261646560c01b604482015290519081900360640190fd5b6100bc8161015560201b6101c71760201c565b61010d576040805162461bcd60e51b815260206004820152601860248201527f696d706c656d656e746174696f6e2021636f6e74726163740000000000000000604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b038316908117825560405190917ff78721226efe9a1bb678189a16d1554928b9f2192e2cb93eeda83b79fa40007d91a250565b3b151590565b60805160601c6101da61017760003980601c52506101da6000f3fe60806040523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461004d5760005460005260206000f35b6000356100598161005c565b50005b60005473ffffffffffffffffffffffffffffffffffffffff828116911614156100e657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2175706772616465000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6100ef816101c7565b61015a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696d706c656d656e746174696f6e2021636f6e74726163740000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917ff78721226efe9a1bb678189a16d1554928b9f2192e2cb93eeda83b79fa40007d91a250565b3b15159056fea164736f6c6343000706000a",
    "sourceMap": "876:2987:76:-:0;;;1763:158;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1763:158:76;;;;;;;1838:42;1763:158;1838:18;:42::i;:::-;1890:24;;-1:-1:-1;1890:24:76;;;-1:-1:-1;876:2987:76;;3337:524;3500:14;;-1:-1:-1;3500:36:76;;;:14;;:36;;3492:57;;;;;-1:-1:-1;3492:57:76;;;;;;;;;;;;-1:-1:-1;3492:57:76;;;;;;;;;;;;;;;3641:38;3660:18;3641;;;;;:38;;:::i;:::-;3620:109;;;;;-1:-1:-1;;;3620:109:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;3777:14;:35;;-1:-1:-1;3777:35:76;-1:-1:-1;3777:35:76;;;;;;;3827:27;;3777:35;;3827:27;;;3337:524;:::o;726:413:29:-;1086:20;1124:8;;;726:413::o;876:2987:76:-;;;;;;;;;;;;",
    "linkReferences": {}
  },
  "deployedBytecode": {
    "object": "0x60806040523373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461004d5760005460005260206000f35b6000356100598161005c565b50005b60005473ffffffffffffffffffffffffffffffffffffffff828116911614156100e657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2175706772616465000000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6100ef816101c7565b61015a57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f696d706c656d656e746174696f6e2021636f6e74726163740000000000000000604482015290519081900360640190fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405190917ff78721226efe9a1bb678189a16d1554928b9f2192e2cb93eeda83b79fa40007d91a250565b3b15159056fea164736f6c6343000706000a",
    "sourceMap": "876:2987:76:-:0;;;2386:10;:24;2400:10;2386:24;;2382:657;;2613:1;2607:8;2613:1;2597:19;2643:2;2613:1;2633:13;2579:81;2817:26;2906:15;2990:38;2906:15;2990:18;:38::i;:::-;2382:657;876:2987;3337:524;3500:14;;:36;;;;:14;;:36;;3492:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3641:38;3660:18;3641;:38::i;:::-;3620:109;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3777:14;:35;;;;;;;;;;;;3827:27;;3777:35;;3827:27;;;3337:524;:::o;726:413:29:-;1086:20;1124:8;;;726:413::o",
    "linkReferences": {},
    "immutableReferences": {
      "46352": [
        {
          "start": 28,
          "length": 32
        }
      ]
    }
  },
  "methodIdentifiers": {},
  "ast": {
    "absolutePath": "packages/contracts-core/contracts/upgrade/UpgradeBeacon.sol",
    "id": 46428,
    "exportedSymbols": {
      "Address": [
        28026
      ],
      "UpgradeBeacon": [
        46427
      ]
    },
    "nodeType": "SourceUnit",
    "src": "32:3832:76",
    "nodes": [
      {
        "id": 46347,
        "nodeType": "PragmaDirective",
        "src": "32:22:76",
        "literals": [
          "solidity",
          "0.7",
          ".6"
        ]
      },
      {
        "id": 46349,
        "nodeType": "ImportDirective",
        "src": "102:66:76",
        "absolutePath": "node_modules/@openzeppelin/contracts/utils/Address.sol",
        "file": "@openzeppelin/contracts/utils/Address.sol",
        "scope": 46428,
        "sourceUnit": 28027,
        "symbolAliases": [
          {
            "foreign": {
              "id": 46348,
              "name": "Address",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "110:7:76",
              "typeDescriptions": {}
            }
          }
        ],
        "unitAlias": ""
      },
      {
        "id": 46427,
        "nodeType": "ContractDefinition",
        "src": "876:2987:76",
        "nodes": [
          {
            "id": 46352,
            "nodeType": "VariableDeclaration",
            "src": "1023:36:76",
            "constant": false,
            "mutability": "immutable",
            "name": "controller",
            "scope": 46427,
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 46351,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "1023:7:76",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "visibility": "private"
          },
          {
            "id": 46354,
            "nodeType": "VariableDeclaration",
            "src": "1190:30:76",
            "constant": false,
            "mutability": "mutable",
            "name": "implementation",
            "scope": 46427,
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_address",
              "typeString": "address"
            },
            "typeName": {
              "id": 46353,
              "name": "address",
              "nodeType": "ElementaryTypeName",
              "src": "1190:7:76",
              "stateMutability": "nonpayable",
              "typeDescriptions": {
                "typeIdentifier": "t_address",
                "typeString": "address"
              }
            },
            "visibility": "private"
          },
          {
            "id": 46358,
            "nodeType": "EventDefinition",
            "src": "1374:46:76",
            "anonymous": false,
            "name": "Upgrade",
            "parameters": {
              "id": 46357,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 46356,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "implementation",
                  "nodeType": "VariableDeclaration",
                  "scope": 46358,
                  "src": "1388:30:76",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 46355,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1388:7:76",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1387:32:76"
            }
          },
          {
            "id": 46375,
            "nodeType": "FunctionDefinition",
            "src": "1763:158:76",
            "body": {
              "id": 46374,
              "nodeType": "Block",
              "src": "1828:93:76",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 46367,
                        "name": "_initialImplementation",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 46361,
                        "src": "1857:22:76",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 46366,
                      "name": "_setImplementation",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 46426,
                      "src": "1838:18:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                        "typeString": "function (address)"
                      }
                    },
                    "id": 46368,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1838:42:76",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 46369,
                  "nodeType": "ExpressionStatement",
                  "src": "1838:42:76"
                },
                {
                  "expression": {
                    "id": 46372,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 46370,
                      "name": "controller",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 46352,
                      "src": "1890:10:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 46371,
                      "name": "_controller",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 46363,
                      "src": "1903:11:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "1890:24:76",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 46373,
                  "nodeType": "ExpressionStatement",
                  "src": "1890:24:76"
                }
              ]
            },
            "documentation": {
              "id": 46359,
              "nodeType": "StructuredDocumentation",
              "src": "1472:286:76",
              "text": " @notice Validate the initial implementation and store it.\n Store the controller immutably.\n @param _initialImplementation Address of the initial implementation contract\n @param _controller Address of the controller who can upgrade the implementation"
            },
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "parameters": {
              "id": 46364,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 46361,
                  "mutability": "mutable",
                  "name": "_initialImplementation",
                  "nodeType": "VariableDeclaration",
                  "scope": 46375,
                  "src": "1775:30:76",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 46360,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1775:7:76",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 46363,
                  "mutability": "mutable",
                  "name": "_controller",
                  "nodeType": "VariableDeclaration",
                  "scope": 46375,
                  "src": "1807:19:76",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 46362,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "1807:7:76",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1774:53:76"
            },
            "returnParameters": {
              "id": 46365,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1828:0:76"
            },
            "scope": 46427,
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "id": 46396,
            "nodeType": "FunctionDefinition",
            "src": "2344:701:76",
            "body": {
              "id": 46395,
              "nodeType": "Block",
              "src": "2372:673:76",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 46382,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "expression": {
                        "id": 46379,
                        "name": "msg",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": -15,
                        "src": "2386:3:76",
                        "typeDescriptions": {
                          "typeIdentifier": "t_magic_message",
                          "typeString": "msg"
                        }
                      },
                      "id": 46380,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "sender",
                      "nodeType": "MemberAccess",
                      "src": "2386:10:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "id": 46381,
                      "name": "controller",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 46352,
                      "src": "2400:10:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "2386:24:76",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 46393,
                    "nodeType": "Block",
                    "src": "2676:363:76",
                    "statements": [
                      {
                        "assignments": [
                          46386
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 46386,
                            "mutability": "mutable",
                            "name": "_newImplementation",
                            "nodeType": "VariableDeclaration",
                            "scope": 46393,
                            "src": "2817:26:76",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            },
                            "typeName": {
                              "id": 46385,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "2817:7:76",
                              "stateMutability": "nonpayable",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            },
                            "visibility": "internal"
                          }
                        ],
                        "id": 46387,
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2817:26:76"
                      },
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "2866:69:76",
                          "statements": [
                            {
                              "nodeType": "YulAssignment",
                              "src": "2884:37:76",
                              "value": {
                                "arguments": [
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "2919:1:76",
                                    "type": "",
                                    "value": "0"
                                  }
                                ],
                                "functionName": {
                                  "name": "calldataload",
                                  "nodeType": "YulIdentifier",
                                  "src": "2906:12:76"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "2906:15:76"
                              },
                              "variableNames": [
                                {
                                  "name": "_newImplementation",
                                  "nodeType": "YulIdentifier",
                                  "src": "2884:18:76"
                                }
                              ]
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [
                          {
                            "declaration": 46386,
                            "isOffset": false,
                            "isSlot": false,
                            "src": "2884:18:76",
                            "valueSize": 1
                          }
                        ],
                        "id": 46388,
                        "nodeType": "InlineAssembly",
                        "src": "2857:78:76"
                      },
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 46390,
                              "name": "_newImplementation",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 46386,
                              "src": "3009:18:76",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 46389,
                            "name": "_setImplementation",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 46426,
                            "src": "2990:18:76",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
                              "typeString": "function (address)"
                            }
                          },
                          "id": 46391,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2990:38:76",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 46392,
                        "nodeType": "ExpressionStatement",
                        "src": "2990:38:76"
                      }
                    ]
                  },
                  "id": 46394,
                  "nodeType": "IfStatement",
                  "src": "2382:657:76",
                  "trueBody": {
                    "id": 46384,
                    "nodeType": "Block",
                    "src": "2412:258:76",
                    "statements": [
                      {
                        "AST": {
                          "nodeType": "YulBlock",
                          "src": "2579:81:76",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "2604:1:76",
                                    "type": "",
                                    "value": "0"
                                  },
                                  {
                                    "arguments": [
                                      {
                                        "kind": "number",
                                        "nodeType": "YulLiteral",
                                        "src": "2613:1:76",
                                        "type": "",
                                        "value": "0"
                                      }
                                    ],
                                    "functionName": {
                                      "name": "sload",
                                      "nodeType": "YulIdentifier",
                                      "src": "2607:5:76"
                                    },
                                    "nodeType": "YulFunctionCall",
                                    "src": "2607:8:76"
                                  }
                                ],
                                "functionName": {
                                  "name": "mstore",
                                  "nodeType": "YulIdentifier",
                                  "src": "2597:6:76"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "2597:19:76"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "2597:19:76"
                            },
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "2640:1:76",
                                    "type": "",
                                    "value": "0"
                                  },
                                  {
                                    "kind": "number",
                                    "nodeType": "YulLiteral",
                                    "src": "2643:2:76",
                                    "type": "",
                                    "value": "32"
                                  }
                                ],
                                "functionName": {
                                  "name": "return",
                                  "nodeType": "YulIdentifier",
                                  "src": "2633:6:76"
                                },
                                "nodeType": "YulFunctionCall",
                                "src": "2633:13:76"
                              },
                              "nodeType": "YulExpressionStatement",
                              "src": "2633:13:76"
                            }
                          ]
                        },
                        "evmVersion": "istanbul",
                        "externalReferences": [],
                        "id": 46383,
                        "nodeType": "InlineAssembly",
                        "src": "2570:90:76"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 46376,
              "nodeType": "StructuredDocumentation",
              "src": "1980:359:76",
              "text": " @notice For all callers except the controller, return the current implementation address.\n If called by the Controller, update the implementation address\n to the address passed in the calldata.\n Note: this requires inline assembly because Solidity fallback functions\n do not natively take arguments or return values."
            },
            "implemented": true,
            "kind": "fallback",
            "modifiers": [],
            "name": "",
            "parameters": {
              "id": 46377,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2352:2:76"
            },
            "returnParameters": {
              "id": 46378,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2372:0:76"
            },
            "scope": 46427,
            "stateMutability": "payable",
            "virtual": false,
            "visibility": "external"
          },
          {
            "id": 46426,
            "nodeType": "FunctionDefinition",
            "src": "3337:524:76",
            "body": {
              "id": 46425,
              "nodeType": "Block",
              "src": "3401:460:76",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 46405,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 46403,
                          "name": "implementation",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 46354,
                          "src": "3500:14:76",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "id": 46404,
                          "name": "_newImplementation",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 46399,
                          "src": "3518:18:76",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "3500:36:76",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "2175706772616465",
                        "id": 46406,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3538:10:76",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_46c85c57ceaa4579e3e908abc1b992f5ebc8c86a6809c17d59c98ec622400853",
                          "typeString": "literal_string \"!upgrade\""
                        },
                        "value": "!upgrade"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_46c85c57ceaa4579e3e908abc1b992f5ebc8c86a6809c17d59c98ec622400853",
                          "typeString": "literal_string \"!upgrade\""
                        }
                      ],
                      "id": 46402,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "3492:7:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 46407,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3492:57:76",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 46408,
                  "nodeType": "ExpressionStatement",
                  "src": "3492:57:76"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "arguments": [
                          {
                            "id": 46412,
                            "name": "_newImplementation",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 46399,
                            "src": "3660:18:76",
                            "typeDescriptions": {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_address",
                              "typeString": "address"
                            }
                          ],
                          "expression": {
                            "id": 46410,
                            "name": "Address",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 28026,
                            "src": "3641:7:76",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_contract$_Address_$28026_$",
                              "typeString": "type(library Address)"
                            }
                          },
                          "id": 46411,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "isContract",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 27750,
                          "src": "3641:18:76",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_bool_$",
                            "typeString": "function (address) view returns (bool)"
                          }
                        },
                        "id": 46413,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3641:38:76",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "696d706c656d656e746174696f6e2021636f6e7472616374",
                        "id": 46414,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3693:26:76",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_b54c71a6fbb2ca345b95c1e2a89104a71ffbc5a4655ce78640a26a7da0e72d58",
                          "typeString": "literal_string \"implementation !contract\""
                        },
                        "value": "implementation !contract"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_b54c71a6fbb2ca345b95c1e2a89104a71ffbc5a4655ce78640a26a7da0e72d58",
                          "typeString": "literal_string \"implementation !contract\""
                        }
                      ],
                      "id": 46409,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "3620:7:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 46415,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3620:109:76",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 46416,
                  "nodeType": "ExpressionStatement",
                  "src": "3620:109:76"
                },
                {
                  "expression": {
                    "id": 46419,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 46417,
                      "name": "implementation",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 46354,
                      "src": "3777:14:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 46418,
                      "name": "_newImplementation",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 46399,
                      "src": "3794:18:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "src": "3777:35:76",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "id": 46420,
                  "nodeType": "ExpressionStatement",
                  "src": "3777:35:76"
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "id": 46422,
                        "name": "_newImplementation",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 46399,
                        "src": "3835:18:76",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "id": 46421,
                      "name": "Upgrade",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 46358,
                      "src": "3827:7:76",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_address_$returns$__$",
                        "typeString": "function (address)"
                      }
                    },
                    "id": 46423,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3827:27:76",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 46424,
                  "nodeType": "EmitStatement",
                  "src": "3822:32:76"
                }
              ]
            },
            "documentation": {
              "id": 46397,
              "nodeType": "StructuredDocumentation",
              "src": "3103:229:76",
              "text": " @notice Perform checks on the new implementation address\n then upgrade the stored implementation.\n @param _newImplementation Address of the new implementation contract which will replace the old one"
            },
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_setImplementation",
            "parameters": {
              "id": 46400,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 46399,
                  "mutability": "mutable",
                  "name": "_newImplementation",
                  "nodeType": "VariableDeclaration",
                  "scope": 46426,
                  "src": "3365:26:76",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 46398,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3365:7:76",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3364:28:76"
            },
            "returnParameters": {
              "id": 46401,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3401:0:76"
            },
            "scope": 46427,
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "private"
          }
        ],
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": {
          "id": 46350,
          "nodeType": "StructuredDocumentation",
          "src": "170:705:76",
          "text": " @title UpgradeBeacon\n @notice Stores the address of an implementation contract\n and allows a controller to upgrade the implementation address\n @dev This implementation combines the gas savings of having no function selectors\n found in 0age's implementation:\n https://github.com/dharma-eng/dharma-smart-wallet/blob/master/contracts/proxies/smart-wallet/UpgradeBeaconProxyV1.sol\n With the added niceties of a safety check that each implementation is a contract\n and an Upgrade event emitted each time the implementation is changed\n found in OpenZeppelin's implementation:\n https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/beacon/BeaconProxy.sol"
        },
        "fullyImplemented": true,
        "linearizedBaseContracts": [
          46427
        ],
        "name": "UpgradeBeacon",
        "scope": 46428
      }
    ],
    "license": "MIT"
  },
  "id": 76
}