{
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "previousAdmin",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "address",
          "name": "newAdmin",
          "type": "address"
        }
      ],
      "name": "AdminChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "beacon",
          "type": "address"
        }
      ],
      "name": "BeaconUpgraded",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "enum IPolicyPoolConfig.GovernanceActions",
          "name": "action",
          "type": "uint8"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "GovernanceAction",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Paused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": false,
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "Unpaused",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "implementation",
          "type": "address"
        }
      ],
      "name": "Upgraded",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "GUARDIAN_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "LEVEL1_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "LEVEL2_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "LEVEL3_ROLE",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "TWEAK_EXPIRATION",
      "outputs": [
        {
          "internalType": "uint40",
          "name": "",
          "type": "uint40"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "currency",
      "outputs": [
        {
          "internalType": "contract IERC20Metadata",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "lastTweak",
      "outputs": [
        {
          "internalType": "uint40",
          "name": "",
          "type": "uint40"
        },
        {
          "internalType": "uint56",
          "name": "",
          "type": "uint56"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "pause",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "paused",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "policyPool",
      "outputs": [
        {
          "internalType": "contract IPolicyPool",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "proxiableUUID",
      "outputs": [
        {
          "internalType": "bytes32",
          "name": "",
          "type": "bytes32"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "unpause",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newImplementation",
          "type": "address"
        }
      ],
      "name": "upgradeTo",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newImplementation",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "upgradeToAndCall",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }
  ],
  "allSourcePaths": {
    "10": "contracts/PolicyPoolComponent.sol",
    "14": "contracts/WadRayMath.sol",
    "31": "interfaces/IAssetManager.sol",
    "32": "interfaces/IEToken.sol",
    "33": "interfaces/IExchange.sol",
    "34": "interfaces/IInsolvencyHook.sol",
    "35": "interfaces/ILPWhitelist.sol",
    "37": "interfaces/IPolicyPool.sol",
    "38": "interfaces/IPolicyPoolComponent.sol",
    "39": "interfaces/IPolicyPoolConfig.sol",
    "40": "interfaces/IRiskModule.sol",
    "69": "node_modules/@openzeppelin/contracts-upgradeable/interfaces/draft-IERC1822Upgradeable.sol",
    "70": "node_modules/@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol",
    "72": "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol",
    "73": "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol",
    "74": "node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol",
    "83": "node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol",
    "98": "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"
  },
  "ast": {
    "absolutePath": "contracts/PolicyPoolComponent.sol",
    "exportedSymbols": {
      "IERC20Metadata": [
        16271
      ],
      "IPolicyPool": [
        14671
      ],
      "IPolicyPoolComponent": [
        19141
      ],
      "IPolicyPoolConfig": [
        14792
      ],
      "PausableUpgradeable": [
        18122
      ],
      "PolicyPoolComponent": [
        9172
      ],
      "UUPSUpgradeable": [
        18011
      ],
      "WadRayMath": [
        11252
      ]
    },
    "id": 9173,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 8703,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "39:23:10"
      },
      {
        "absolutePath": "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol",
        "file": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol",
        "id": 8705,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 9173,
        "sourceUnit": 18012,
        "src": "64:100:10",
        "symbolAliases": [
          {
            "foreign": {
              "id": 8704,
              "name": "UUPSUpgradeable",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "72:15:10",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
        "file": "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
        "id": 8707,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 9173,
        "sourceUnit": 16272,
        "src": "165:97:10",
        "symbolAliases": [
          {
            "foreign": {
              "id": 8706,
              "name": "IERC20Metadata",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "173:14:10",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "interfaces/IPolicyPool.sol",
        "file": "../interfaces/IPolicyPool.sol",
        "id": 8709,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 9173,
        "sourceUnit": 14672,
        "src": "263:58:10",
        "symbolAliases": [
          {
            "foreign": {
              "id": 8708,
              "name": "IPolicyPool",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "271:11:10",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "interfaces/IPolicyPoolComponent.sol",
        "file": "../interfaces/IPolicyPoolComponent.sol",
        "id": 8711,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 9173,
        "sourceUnit": 19142,
        "src": "322:76:10",
        "symbolAliases": [
          {
            "foreign": {
              "id": 8710,
              "name": "IPolicyPoolComponent",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "330:20:10",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "interfaces/IPolicyPoolConfig.sol",
        "file": "../interfaces/IPolicyPoolConfig.sol",
        "id": 8713,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 9173,
        "sourceUnit": 14793,
        "src": "399:70:10",
        "symbolAliases": [
          {
            "foreign": {
              "id": 8712,
              "name": "IPolicyPoolConfig",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "407:17:10",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "node_modules/@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol",
        "file": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol",
        "id": 8715,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 9173,
        "sourceUnit": 18123,
        "src": "470:105:10",
        "symbolAliases": [
          {
            "foreign": {
              "id": 8714,
              "name": "PausableUpgradeable",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "478:19:10",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "contracts/WadRayMath.sol",
        "file": "./WadRayMath.sol",
        "id": 8717,
        "nameLocation": "-1:-1:-1",
        "nodeType": "ImportDirective",
        "scope": 9173,
        "sourceUnit": 11253,
        "src": "576:44:10",
        "symbolAliases": [
          {
            "foreign": {
              "id": 8716,
              "name": "WadRayMath",
              "nodeType": "Identifier",
              "overloadedDeclarations": [],
              "src": "584:10:10",
              "typeDescriptions": {}
            },
            "nameLocation": "-1:-1:-1"
          }
        ],
        "unitAlias": ""
      },
      {
        "abstract": true,
        "baseContracts": [
          {
            "baseName": {
              "id": 8719,
              "name": "UUPSUpgradeable",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 18011,
              "src": "1543:15:10"
            },
            "id": 8720,
            "nodeType": "InheritanceSpecifier",
            "src": "1543:15:10"
          },
          {
            "baseName": {
              "id": 8721,
              "name": "PausableUpgradeable",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 18122,
              "src": "1562:19:10"
            },
            "id": 8722,
            "nodeType": "InheritanceSpecifier",
            "src": "1562:19:10"
          },
          {
            "baseName": {
              "id": 8723,
              "name": "IPolicyPoolComponent",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 19141,
              "src": "1585:20:10"
            },
            "id": 8724,
            "nodeType": "InheritanceSpecifier",
            "src": "1585:20:10"
          }
        ],
        "contractDependencies": [],
        "contractKind": "contract",
        "documentation": {
          "id": 8718,
          "nodeType": "StructuredDocumentation",
          "src": "622:877:10",
          "text": " @title Base class for PolicyPool components\n @dev This is the base class of all the components of the protocol that are linked to the PolicyPool and created\n      after it.\n      Holds the reference to _policyPool as immutable, also provides access to common admin roles:\n      - LEVEL1_ROLE: High impact changes like upgrades or other critical operations\n      - LEVEL2_ROLE: Mid-impact changes like adding new risk modules or changing some parameters\n      - LEVEL3_ROLE: Low-impact changes like changing some parameters up to given percentage (tweaks)\n      - GUARDIAN_ROLE: For emergency operations oriented to protect the protocol in case of attacks or hacking.\n      This contract also keeps track of the tweaks to avoid two tweaks of the same type are done in a short period.\n @custom:security-contact security@ensuro.co\n @author Ensuro"
        },
        "fullyImplemented": true,
        "id": 9172,
        "linearizedBaseContracts": [
          9172,
          19141,
          18122,
          26020,
          18011,
          25978,
          25609,
          19544
        ],
        "name": "PolicyPoolComponent",
        "nameLocation": "1518:19:10",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "id": 8727,
            "libraryName": {
              "id": 8725,
              "name": "WadRayMath",
              "nodeType": "IdentifierPath",
              "referencedDeclaration": 11252,
              "src": "1616:10:10"
            },
            "nodeType": "UsingForDirective",
            "src": "1610:29:10",
            "typeName": {
              "id": 8726,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "1631:7:10",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            }
          },
          {
            "constant": true,
            "functionSelector": "24ea54f4",
            "id": 8732,
            "mutability": "constant",
            "name": "GUARDIAN_ROLE",
            "nameLocation": "1667:13:10",
            "nodeType": "VariableDeclaration",
            "scope": 9172,
            "src": "1643:66:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 8728,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "1643:7:10",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": {
              "arguments": [
                {
                  "hexValue": "475541524449414e5f524f4c45",
                  "id": 8730,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "kind": "string",
                  "lValueRequested": false,
                  "nodeType": "Literal",
                  "src": "1693:15:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_stringliteral_55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a5041",
                    "typeString": "literal_string \"GUARDIAN_ROLE\""
                  },
                  "value": "GUARDIAN_ROLE"
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_stringliteral_55435dd261a4b9b3364963f7738a7a662ad9c84396d64be3365284bb7f0a5041",
                    "typeString": "literal_string \"GUARDIAN_ROLE\""
                  }
                ],
                "id": 8729,
                "name": "keccak256",
                "nodeType": "Identifier",
                "overloadedDeclarations": [],
                "referencedDeclaration": -8,
                "src": "1683:9:10",
                "typeDescriptions": {
                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                  "typeString": "function (bytes memory) pure returns (bytes32)"
                }
              },
              "id": 8731,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "functionCall",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "1683:26:10",
              "tryCall": false,
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "visibility": "public"
          },
          {
            "constant": true,
            "functionSelector": "f67b2bad",
            "id": 8737,
            "mutability": "constant",
            "name": "LEVEL1_ROLE",
            "nameLocation": "1737:11:10",
            "nodeType": "VariableDeclaration",
            "scope": 9172,
            "src": "1713:62:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 8733,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "1713:7:10",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": {
              "arguments": [
                {
                  "hexValue": "4c4556454c315f524f4c45",
                  "id": 8735,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "kind": "string",
                  "lValueRequested": false,
                  "nodeType": "Literal",
                  "src": "1761:13:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_stringliteral_bf372ca3ebecfe59ac256f17697941bbe63302aced610e8b0e3646f743c7beb2",
                    "typeString": "literal_string \"LEVEL1_ROLE\""
                  },
                  "value": "LEVEL1_ROLE"
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_stringliteral_bf372ca3ebecfe59ac256f17697941bbe63302aced610e8b0e3646f743c7beb2",
                    "typeString": "literal_string \"LEVEL1_ROLE\""
                  }
                ],
                "id": 8734,
                "name": "keccak256",
                "nodeType": "Identifier",
                "overloadedDeclarations": [],
                "referencedDeclaration": -8,
                "src": "1751:9:10",
                "typeDescriptions": {
                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                  "typeString": "function (bytes memory) pure returns (bytes32)"
                }
              },
              "id": 8736,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "functionCall",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "1751:24:10",
              "tryCall": false,
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "visibility": "public"
          },
          {
            "constant": true,
            "functionSelector": "4a47a3e0",
            "id": 8742,
            "mutability": "constant",
            "name": "LEVEL2_ROLE",
            "nameLocation": "1803:11:10",
            "nodeType": "VariableDeclaration",
            "scope": 9172,
            "src": "1779:62:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 8738,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "1779:7:10",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": {
              "arguments": [
                {
                  "hexValue": "4c4556454c325f524f4c45",
                  "id": 8740,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "kind": "string",
                  "lValueRequested": false,
                  "nodeType": "Literal",
                  "src": "1827:13:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_stringliteral_a82e22387fca439f316d78ca566f383218ab8ae1b3e830178c9c82cbd16749c0",
                    "typeString": "literal_string \"LEVEL2_ROLE\""
                  },
                  "value": "LEVEL2_ROLE"
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_stringliteral_a82e22387fca439f316d78ca566f383218ab8ae1b3e830178c9c82cbd16749c0",
                    "typeString": "literal_string \"LEVEL2_ROLE\""
                  }
                ],
                "id": 8739,
                "name": "keccak256",
                "nodeType": "Identifier",
                "overloadedDeclarations": [],
                "referencedDeclaration": -8,
                "src": "1817:9:10",
                "typeDescriptions": {
                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                  "typeString": "function (bytes memory) pure returns (bytes32)"
                }
              },
              "id": 8741,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "functionCall",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "1817:24:10",
              "tryCall": false,
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "visibility": "public"
          },
          {
            "constant": true,
            "functionSelector": "5b494dd5",
            "id": 8747,
            "mutability": "constant",
            "name": "LEVEL3_ROLE",
            "nameLocation": "1869:11:10",
            "nodeType": "VariableDeclaration",
            "scope": 9172,
            "src": "1845:62:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_bytes32",
              "typeString": "bytes32"
            },
            "typeName": {
              "id": 8743,
              "name": "bytes32",
              "nodeType": "ElementaryTypeName",
              "src": "1845:7:10",
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "value": {
              "arguments": [
                {
                  "hexValue": "4c4556454c335f524f4c45",
                  "id": 8745,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "kind": "string",
                  "lValueRequested": false,
                  "nodeType": "Literal",
                  "src": "1893:13:10",
                  "typeDescriptions": {
                    "typeIdentifier": "t_stringliteral_5ec196419322369c6bac572d883f4d990ae5ec82f7d93cdf89b85dbb05b63c27",
                    "typeString": "literal_string \"LEVEL3_ROLE\""
                  },
                  "value": "LEVEL3_ROLE"
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_stringliteral_5ec196419322369c6bac572d883f4d990ae5ec82f7d93cdf89b85dbb05b63c27",
                    "typeString": "literal_string \"LEVEL3_ROLE\""
                  }
                ],
                "id": 8744,
                "name": "keccak256",
                "nodeType": "Identifier",
                "overloadedDeclarations": [],
                "referencedDeclaration": -8,
                "src": "1883:9:10",
                "typeDescriptions": {
                  "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                  "typeString": "function (bytes memory) pure returns (bytes32)"
                }
              },
              "id": 8746,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "functionCall",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "1883:24:10",
              "tryCall": false,
              "typeDescriptions": {
                "typeIdentifier": "t_bytes32",
                "typeString": "bytes32"
              }
            },
            "visibility": "public"
          },
          {
            "constant": true,
            "functionSelector": "7ed5acfa",
            "id": 8750,
            "mutability": "constant",
            "name": "TWEAK_EXPIRATION",
            "nameLocation": "1935:16:10",
            "nodeType": "VariableDeclaration",
            "scope": 9172,
            "src": "1912:48:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint40",
              "typeString": "uint40"
            },
            "typeName": {
              "id": 8748,
              "name": "uint40",
              "nodeType": "ElementaryTypeName",
              "src": "1912:6:10",
              "typeDescriptions": {
                "typeIdentifier": "t_uint40",
                "typeString": "uint40"
              }
            },
            "value": {
              "hexValue": "31",
              "id": 8749,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "number",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "1954:6:10",
              "subdenomination": "days",
              "typeDescriptions": {
                "typeIdentifier": "t_rational_86400_by_1",
                "typeString": "int_const 86400"
              },
              "value": "1"
            },
            "visibility": "public"
          },
          {
            "constant": false,
            "documentation": {
              "id": 8751,
              "nodeType": "StructuredDocumentation",
              "src": "1965:61:10",
              "text": "@custom:oz-upgrades-unsafe-allow state-variable-immutable"
            },
            "id": 8754,
            "mutability": "immutable",
            "name": "_policyPool",
            "nameLocation": "2060:11:10",
            "nodeType": "VariableDeclaration",
            "scope": 9172,
            "src": "2029:42:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
              "typeString": "contract IPolicyPool"
            },
            "typeName": {
              "id": 8753,
              "nodeType": "UserDefinedTypeName",
              "pathNode": {
                "id": 8752,
                "name": "IPolicyPool",
                "nodeType": "IdentifierPath",
                "referencedDeclaration": 14671,
                "src": "2029:11:10"
              },
              "referencedDeclaration": 14671,
              "src": "2029:11:10",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                "typeString": "contract IPolicyPool"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 8756,
            "mutability": "mutable",
            "name": "_lastTweakTimestamp",
            "nameLocation": "2091:19:10",
            "nodeType": "VariableDeclaration",
            "scope": 9172,
            "src": "2075:35:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint40",
              "typeString": "uint40"
            },
            "typeName": {
              "id": 8755,
              "name": "uint40",
              "nodeType": "ElementaryTypeName",
              "src": "2075:6:10",
              "typeDescriptions": {
                "typeIdentifier": "t_uint40",
                "typeString": "uint40"
              }
            },
            "visibility": "internal"
          },
          {
            "constant": false,
            "id": 8758,
            "mutability": "mutable",
            "name": "_lastTweakActions",
            "nameLocation": "2130:17:10",
            "nodeType": "VariableDeclaration",
            "scope": 9172,
            "src": "2114:33:10",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint56",
              "typeString": "uint56"
            },
            "typeName": {
              "id": 8757,
              "name": "uint56",
              "nodeType": "ElementaryTypeName",
              "src": "2114:6:10",
              "typeDescriptions": {
                "typeIdentifier": "t_uint56",
                "typeString": "uint56"
              }
            },
            "visibility": "internal"
          },
          {
            "anonymous": false,
            "id": 8765,
            "name": "GovernanceAction",
            "nameLocation": "2192:16:10",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 8764,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8761,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "action",
                  "nameLocation": "2253:6:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8765,
                  "src": "2209:50:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                    "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                  },
                  "typeName": {
                    "id": 8760,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 8759,
                      "name": "IPolicyPoolConfig.GovernanceActions",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 14718,
                      "src": "2209:35:10"
                    },
                    "referencedDeclaration": 14718,
                    "src": "2209:35:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                      "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8763,
                  "indexed": false,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "2269:5:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8765,
                  "src": "2261:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8762,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2261:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2208:67:10"
            },
            "src": "2186:90:10"
          },
          {
            "body": {
              "id": 8779,
              "nodeType": "Block",
              "src": "2306:100:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 8774,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "arguments": [],
                          "expression": {
                            "argumentTypes": [],
                            "id": 8768,
                            "name": "_msgSender",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 26005,
                            "src": "2320:10:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                              "typeString": "function () view returns (address)"
                            }
                          },
                          "id": 8769,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2320:12:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "arguments": [
                            {
                              "id": 8772,
                              "name": "_policyPool",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8754,
                              "src": "2344:11:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                                "typeString": "contract IPolicyPool"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                                "typeString": "contract IPolicyPool"
                              }
                            ],
                            "id": 8771,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "2336:7:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": {
                              "id": 8770,
                              "name": "address",
                              "nodeType": "ElementaryTypeName",
                              "src": "2336:7:10",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 8773,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2336:20:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "src": "2320:36:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "5468652063616c6c6572206d7573742062652074686520506f6c696379506f6f6c",
                        "id": 8775,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2358:35:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_9d0a356323ce3e3c29a3e2bb48578fedab9a434614d6f39614688cfd87c4b961",
                          "typeString": "literal_string \"The caller must be the PolicyPool\""
                        },
                        "value": "The caller must be the PolicyPool"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_9d0a356323ce3e3c29a3e2bb48578fedab9a434614d6f39614688cfd87c4b961",
                          "typeString": "literal_string \"The caller must be the PolicyPool\""
                        }
                      ],
                      "id": 8767,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "2312:7:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 8776,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2312:82:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8777,
                  "nodeType": "ExpressionStatement",
                  "src": "2312:82:10"
                },
                {
                  "id": 8778,
                  "nodeType": "PlaceholderStatement",
                  "src": "2400:1:10"
                }
              ]
            },
            "id": 8780,
            "name": "onlyPolicyPool",
            "nameLocation": "2289:14:10",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 8766,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2303:2:10"
            },
            "src": "2280:126:10",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 8806,
              "nodeType": "Block",
              "src": "2494:114:10",
              "statements": [
                {
                  "condition": {
                    "id": 8791,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "!",
                    "prefix": true,
                    "src": "2504:19:10",
                    "subExpression": {
                      "arguments": [
                        {
                          "id": 8789,
                          "name": "role1",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 8782,
                          "src": "2517:5:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_bytes32",
                            "typeString": "bytes32"
                          }
                        ],
                        "id": 8788,
                        "name": "hasPoolRole",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8936,
                        "src": "2505:11:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_view$_t_bytes32_$returns$_t_bool_$",
                          "typeString": "function (bytes32) view returns (bool)"
                        }
                      },
                      "id": 8790,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2505:18:10",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 8804,
                  "nodeType": "IfStatement",
                  "src": "2500:97:10",
                  "trueBody": {
                    "id": 8803,
                    "nodeType": "Block",
                    "src": "2525:72:10",
                    "statements": [
                      {
                        "expression": {
                          "arguments": [
                            {
                              "id": 8797,
                              "name": "role2",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8784,
                              "src": "2565:5:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "id": 8798,
                              "name": "role3",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 8786,
                              "src": "2572:5:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              }
                            },
                            {
                              "expression": {
                                "id": 8799,
                                "name": "msg",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": -15,
                                "src": "2579:3:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_message",
                                  "typeString": "msg"
                                }
                              },
                              "id": 8800,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "sender",
                              "nodeType": "MemberAccess",
                              "src": "2579:10:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_bytes32",
                                "typeString": "bytes32"
                              },
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "expression": {
                              "arguments": [],
                              "expression": {
                                "argumentTypes": [],
                                "expression": {
                                  "id": 8792,
                                  "name": "_policyPool",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8754,
                                  "src": "2533:11:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                                    "typeString": "contract IPolicyPool"
                                  }
                                },
                                "id": 8794,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "config",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 14578,
                                "src": "2533:18:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IPolicyPoolConfig_$14792_$",
                                  "typeString": "function () view external returns (contract IPolicyPoolConfig)"
                                }
                              },
                              "id": 8795,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "2533:20:10",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IPolicyPoolConfig_$14792",
                                "typeString": "contract IPolicyPoolConfig"
                              }
                            },
                            "id": 8796,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "checkRole2",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 14747,
                            "src": "2533:31:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_bytes32_$_t_address_$returns$__$",
                              "typeString": "function (bytes32,bytes32,address) view external"
                            }
                          },
                          "id": 8801,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2533:57:10",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 8802,
                        "nodeType": "ExpressionStatement",
                        "src": "2533:57:10"
                      }
                    ]
                  }
                },
                {
                  "id": 8805,
                  "nodeType": "PlaceholderStatement",
                  "src": "2602:1:10"
                }
              ]
            },
            "id": 8807,
            "name": "onlyPoolRole3",
            "nameLocation": "2419:13:10",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 8787,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8782,
                  "mutability": "mutable",
                  "name": "role1",
                  "nameLocation": "2446:5:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8807,
                  "src": "2438:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 8781,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2438:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8784,
                  "mutability": "mutable",
                  "name": "role2",
                  "nameLocation": "2465:5:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8807,
                  "src": "2457:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 8783,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2457:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8786,
                  "mutability": "mutable",
                  "name": "role3",
                  "nameLocation": "2484:5:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8807,
                  "src": "2476:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 8785,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2476:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2432:61:10"
            },
            "src": "2410:198:10",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 8825,
              "nodeType": "Block",
              "src": "2665:75:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 8818,
                        "name": "role1",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8809,
                        "src": "2703:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "id": 8819,
                        "name": "role2",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8811,
                        "src": "2710:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "expression": {
                          "id": 8820,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "2717:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8821,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "src": "2717:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "id": 8813,
                            "name": "_policyPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8754,
                            "src": "2671:11:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          },
                          "id": 8815,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "config",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14578,
                          "src": "2671:18:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IPolicyPoolConfig_$14792_$",
                            "typeString": "function () view external returns (contract IPolicyPoolConfig)"
                          }
                        },
                        "id": 8816,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2671:20:10",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IPolicyPoolConfig_$14792",
                          "typeString": "contract IPolicyPoolConfig"
                        }
                      },
                      "id": 8817,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "checkRole2",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 14747,
                      "src": "2671:31:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_bytes32_$_t_address_$returns$__$",
                        "typeString": "function (bytes32,bytes32,address) view external"
                      }
                    },
                    "id": 8822,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2671:57:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8823,
                  "nodeType": "ExpressionStatement",
                  "src": "2671:57:10"
                },
                {
                  "id": 8824,
                  "nodeType": "PlaceholderStatement",
                  "src": "2734:1:10"
                }
              ]
            },
            "id": 8826,
            "name": "onlyPoolRole2",
            "nameLocation": "2621:13:10",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 8812,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8809,
                  "mutability": "mutable",
                  "name": "role1",
                  "nameLocation": "2643:5:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8826,
                  "src": "2635:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 8808,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2635:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8811,
                  "mutability": "mutable",
                  "name": "role2",
                  "nameLocation": "2658:5:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8826,
                  "src": "2650:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 8810,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2650:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2634:30:10"
            },
            "src": "2612:128:10",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 8841,
              "nodeType": "Block",
              "src": "2780:66:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 8835,
                        "name": "role",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8828,
                        "src": "2817:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "expression": {
                          "id": 8836,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "2823:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8837,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "src": "2823:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "id": 8830,
                            "name": "_policyPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8754,
                            "src": "2786:11:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          },
                          "id": 8832,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "config",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14578,
                          "src": "2786:18:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IPolicyPoolConfig_$14792_$",
                            "typeString": "function () view external returns (contract IPolicyPoolConfig)"
                          }
                        },
                        "id": 8833,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "2786:20:10",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IPolicyPoolConfig_$14792",
                          "typeString": "contract IPolicyPoolConfig"
                        }
                      },
                      "id": 8834,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "checkRole",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 14738,
                      "src": "2786:30:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_address_$returns$__$",
                        "typeString": "function (bytes32,address) view external"
                      }
                    },
                    "id": 8838,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2786:48:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8839,
                  "nodeType": "ExpressionStatement",
                  "src": "2786:48:10"
                },
                {
                  "id": 8840,
                  "nodeType": "PlaceholderStatement",
                  "src": "2840:1:10"
                }
              ]
            },
            "id": 8842,
            "name": "onlyPoolRole",
            "nameLocation": "2753:12:10",
            "nodeType": "ModifierDefinition",
            "parameters": {
              "id": 8829,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8828,
                  "mutability": "mutable",
                  "name": "role",
                  "nameLocation": "2774:4:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8842,
                  "src": "2766:12:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 8827,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "2766:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2765:14:10"
            },
            "src": "2744:102:10",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 8853,
              "nodeType": "Block",
              "src": "2938:36:10",
              "statements": [
                {
                  "expression": {
                    "id": 8851,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "id": 8849,
                      "name": "_policyPool",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8754,
                      "src": "2944:11:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                        "typeString": "contract IPolicyPool"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "id": 8850,
                      "name": "policyPool_",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8846,
                      "src": "2958:11:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                        "typeString": "contract IPolicyPool"
                      }
                    },
                    "src": "2944:25:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                      "typeString": "contract IPolicyPool"
                    }
                  },
                  "id": 8852,
                  "nodeType": "ExpressionStatement",
                  "src": "2944:25:10"
                }
              ]
            },
            "documentation": {
              "id": 8843,
              "nodeType": "StructuredDocumentation",
              "src": "2850:48:10",
              "text": "@custom:oz-upgrades-unsafe-allow constructor"
            },
            "id": 8854,
            "implemented": true,
            "kind": "constructor",
            "modifiers": [],
            "name": "",
            "nameLocation": "-1:-1:-1",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8847,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8846,
                  "mutability": "mutable",
                  "name": "policyPool_",
                  "nameLocation": "2925:11:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8854,
                  "src": "2913:23:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                    "typeString": "contract IPolicyPool"
                  },
                  "typeName": {
                    "id": 8845,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 8844,
                      "name": "IPolicyPool",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 14671,
                      "src": "2913:11:10"
                    },
                    "referencedDeclaration": 14671,
                    "src": "2913:11:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                      "typeString": "contract IPolicyPool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2912:25:10"
            },
            "returnParameters": {
              "id": 8848,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2938:0:10"
            },
            "scope": 9172,
            "src": "2901:73:10",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 8865,
              "nodeType": "Block",
              "src": "3088:58:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 8859,
                      "name": "__UUPSUpgradeable_init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 17893,
                      "src": "3094:22:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 8860,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3094:24:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8861,
                  "nodeType": "ExpressionStatement",
                  "src": "3094:24:10"
                },
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 8862,
                      "name": "__Pausable_init",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 18042,
                      "src": "3124:15:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 8863,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3124:17:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8864,
                  "nodeType": "ExpressionStatement",
                  "src": "3124:17:10"
                }
              ]
            },
            "id": 8866,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "id": 8857,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 8856,
                  "name": "initializer",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 19518,
                  "src": "3076:11:10"
                },
                "nodeType": "ModifierInvocation",
                "src": "3076:11:10"
              }
            ],
            "name": "__PolicyPoolComponent_init",
            "nameLocation": "3038:26:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8855,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3064:2:10"
            },
            "returnParameters": {
              "id": 8858,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3088:0:10"
            },
            "scope": 9172,
            "src": "3029:117:10",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "baseFunctions": [
              18005
            ],
            "body": {
              "id": 8876,
              "nodeType": "Block",
              "src": "3293:2:10",
              "statements": []
            },
            "id": 8877,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 8872,
                    "name": "GUARDIAN_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8732,
                    "src": "3265:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 8873,
                    "name": "LEVEL1_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8737,
                    "src": "3280:11:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                ],
                "id": 8874,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 8871,
                  "name": "onlyPoolRole2",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8826,
                  "src": "3251:13:10"
                },
                "nodeType": "ModifierInvocation",
                "src": "3251:41:10"
              }
            ],
            "name": "_authorizeUpgrade",
            "nameLocation": "3206:17:10",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 8870,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "3242:8:10"
            },
            "parameters": {
              "id": 8869,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8868,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 8877,
                  "src": "3224:7:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 8867,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3224:7:10",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3223:9:10"
            },
            "returnParameters": {
              "id": 8875,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3293:0:10"
            },
            "scope": 9172,
            "src": "3197:98:10",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 8886,
              "nodeType": "Block",
              "src": "3351:19:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 8883,
                      "name": "_pause",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 18100,
                      "src": "3357:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 8884,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3357:8:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8885,
                  "nodeType": "ExpressionStatement",
                  "src": "3357:8:10"
                }
              ]
            },
            "functionSelector": "8456cb59",
            "id": 8887,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 8880,
                    "name": "GUARDIAN_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8732,
                    "src": "3336:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                ],
                "id": 8881,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 8879,
                  "name": "onlyPoolRole",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8842,
                  "src": "3323:12:10"
                },
                "nodeType": "ModifierInvocation",
                "src": "3323:27:10"
              }
            ],
            "name": "pause",
            "nameLocation": "3308:5:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8878,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3313:2:10"
            },
            "returnParameters": {
              "id": 8882,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3351:0:10"
            },
            "scope": 9172,
            "src": "3299:71:10",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 8897,
              "nodeType": "Block",
              "src": "3442:21:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 8894,
                      "name": "_unpause",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 18116,
                      "src": "3448:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$",
                        "typeString": "function ()"
                      }
                    },
                    "id": 8895,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3448:10:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 8896,
                  "nodeType": "ExpressionStatement",
                  "src": "3448:10:10"
                }
              ]
            },
            "functionSelector": "3f4ba83a",
            "id": 8898,
            "implemented": true,
            "kind": "function",
            "modifiers": [
              {
                "arguments": [
                  {
                    "id": 8890,
                    "name": "GUARDIAN_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8732,
                    "src": "3414:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  {
                    "id": 8891,
                    "name": "LEVEL1_ROLE",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8737,
                    "src": "3429:11:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  }
                ],
                "id": 8892,
                "kind": "modifierInvocation",
                "modifierName": {
                  "id": 8889,
                  "name": "onlyPoolRole2",
                  "nodeType": "IdentifierPath",
                  "referencedDeclaration": 8826,
                  "src": "3400:13:10"
                },
                "nodeType": "ModifierInvocation",
                "src": "3400:41:10"
              }
            ],
            "name": "unpause",
            "nameLocation": "3383:7:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8888,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3390:2:10"
            },
            "returnParameters": {
              "id": 8893,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3442:0:10"
            },
            "scope": 9172,
            "src": "3374:89:10",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "public"
          },
          {
            "baseFunctions": [
              19140
            ],
            "body": {
              "id": 8907,
              "nodeType": "Block",
              "src": "3532:29:10",
              "statements": [
                {
                  "expression": {
                    "id": 8905,
                    "name": "_policyPool",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 8754,
                    "src": "3545:11:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                      "typeString": "contract IPolicyPool"
                    }
                  },
                  "functionReturnParameters": 8904,
                  "id": 8906,
                  "nodeType": "Return",
                  "src": "3538:18:10"
                }
              ]
            },
            "functionSelector": "4d15eb03",
            "id": 8908,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "policyPool",
            "nameLocation": "3476:10:10",
            "nodeType": "FunctionDefinition",
            "overrides": {
              "id": 8900,
              "nodeType": "OverrideSpecifier",
              "overrides": [],
              "src": "3501:8:10"
            },
            "parameters": {
              "id": 8899,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3486:2:10"
            },
            "returnParameters": {
              "id": 8904,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8903,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 8908,
                  "src": "3519:11:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                    "typeString": "contract IPolicyPool"
                  },
                  "typeName": {
                    "id": 8902,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 8901,
                      "name": "IPolicyPool",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 14671,
                      "src": "3519:11:10"
                    },
                    "referencedDeclaration": 14671,
                    "src": "3519:11:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                      "typeString": "contract IPolicyPool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3518:13:10"
            },
            "scope": 9172,
            "src": "3467:94:10",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 8918,
              "nodeType": "Block",
              "src": "3622:40:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "expression": {
                        "id": 8914,
                        "name": "_policyPool",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8754,
                        "src": "3635:11:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                          "typeString": "contract IPolicyPool"
                        }
                      },
                      "id": 8915,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "currency",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 14572,
                      "src": "3635:20:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IERC20Metadata_$16271_$",
                        "typeString": "function () view external returns (contract IERC20Metadata)"
                      }
                    },
                    "id": 8916,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3635:22:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20Metadata_$16271",
                      "typeString": "contract IERC20Metadata"
                    }
                  },
                  "functionReturnParameters": 8913,
                  "id": 8917,
                  "nodeType": "Return",
                  "src": "3628:29:10"
                }
              ]
            },
            "functionSelector": "e5a6b10f",
            "id": 8919,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "currency",
            "nameLocation": "3574:8:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8909,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "3582:2:10"
            },
            "returnParameters": {
              "id": 8913,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8912,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 8919,
                  "src": "3606:14:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20Metadata_$16271",
                    "typeString": "contract IERC20Metadata"
                  },
                  "typeName": {
                    "id": 8911,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 8910,
                      "name": "IERC20Metadata",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 16271,
                      "src": "3606:14:10"
                    },
                    "referencedDeclaration": 16271,
                    "src": "3606:14:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20Metadata_$16271",
                      "typeString": "contract IERC20Metadata"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3605:16:10"
            },
            "scope": 9172,
            "src": "3565:97:10",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "public"
          },
          {
            "body": {
              "id": 8935,
              "nodeType": "Block",
              "src": "3730:64:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 8930,
                        "name": "role",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8921,
                        "src": "3772:4:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      },
                      {
                        "expression": {
                          "id": 8931,
                          "name": "msg",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": -15,
                          "src": "3778:3:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_magic_message",
                            "typeString": "msg"
                          }
                        },
                        "id": 8932,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "sender",
                        "nodeType": "MemberAccess",
                        "src": "3778:10:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        },
                        {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      ],
                      "expression": {
                        "arguments": [],
                        "expression": {
                          "argumentTypes": [],
                          "expression": {
                            "id": 8926,
                            "name": "_policyPool",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8754,
                            "src": "3743:11:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IPolicyPool_$14671",
                              "typeString": "contract IPolicyPool"
                            }
                          },
                          "id": 8927,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "config",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 14578,
                          "src": "3743:18:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_external_view$__$returns$_t_contract$_IPolicyPoolConfig_$14792_$",
                            "typeString": "function () view external returns (contract IPolicyPoolConfig)"
                          }
                        },
                        "id": 8928,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "3743:20:10",
                        "tryCall": false,
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IPolicyPoolConfig_$14792",
                          "typeString": "contract IPolicyPoolConfig"
                        }
                      },
                      "id": 8929,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "hasRole",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 26364,
                      "src": "3743:28:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_external_view$_t_bytes32_$_t_address_$returns$_t_bool_$",
                        "typeString": "function (bytes32,address) view external returns (bool)"
                      }
                    },
                    "id": 8933,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3743:46:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "functionReturnParameters": 8925,
                  "id": 8934,
                  "nodeType": "Return",
                  "src": "3736:53:10"
                }
              ]
            },
            "id": 8936,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "hasPoolRole",
            "nameLocation": "3675:11:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8922,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8921,
                  "mutability": "mutable",
                  "name": "role",
                  "nameLocation": "3695:4:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8936,
                  "src": "3687:12:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bytes32",
                    "typeString": "bytes32"
                  },
                  "typeName": {
                    "id": 8920,
                    "name": "bytes32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3687:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bytes32",
                      "typeString": "bytes32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3686:14:10"
            },
            "returnParameters": {
              "id": 8925,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8924,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 8936,
                  "src": "3724:4:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 8923,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3724:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3723:6:10"
            },
            "scope": 9172,
            "src": "3666:128:10",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 8996,
              "nodeType": "Block",
              "src": "3918:335:10",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 8949,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 8947,
                      "name": "oldValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8938,
                      "src": "3928:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "id": 8948,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8940,
                      "src": "3940:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "3928:20:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 8952,
                  "nodeType": "IfStatement",
                  "src": "3924:37:10",
                  "trueBody": {
                    "expression": {
                      "hexValue": "74727565",
                      "id": 8950,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "bool",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3957:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "value": "true"
                    },
                    "functionReturnParameters": 8946,
                    "id": 8951,
                    "nodeType": "Return",
                    "src": "3950:11:10"
                  }
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 8955,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 8953,
                      "name": "oldValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8938,
                      "src": "3971:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 8954,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "3983:1:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "3971:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 8961,
                  "nodeType": "IfStatement",
                  "src": "3967:52:10",
                  "trueBody": {
                    "expression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 8959,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 8956,
                        "name": "maxTweak",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8942,
                        "src": "3993:8:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">=",
                      "rightExpression": {
                        "expression": {
                          "id": 8957,
                          "name": "WadRayMath",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11252,
                          "src": "4005:10:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_WadRayMath_$11252_$",
                            "typeString": "type(library WadRayMath)"
                          }
                        },
                        "id": 8958,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "RAY",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 10957,
                        "src": "4005:14:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "3993:26:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "functionReturnParameters": 8946,
                    "id": 8960,
                    "nodeType": "Return",
                    "src": "3986:33:10"
                  }
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 8964,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 8962,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8940,
                      "src": "4029:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 8963,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "4041:1:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "4029:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 8967,
                  "nodeType": "IfStatement",
                  "src": "4025:31:10",
                  "trueBody": {
                    "expression": {
                      "hexValue": "66616c7365",
                      "id": 8965,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "bool",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "4051:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "value": "false"
                    },
                    "functionReturnParameters": 8946,
                    "id": 8966,
                    "nodeType": "Return",
                    "src": "4044:12:10"
                  }
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 8970,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 8968,
                      "name": "oldValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8938,
                      "src": "4066:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "id": 8969,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8940,
                      "src": "4077:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4066:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 8994,
                    "nodeType": "Block",
                    "src": "4171:78:10",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8992,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 8989,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 8983,
                                    "name": "WadRayMath",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11252,
                                    "src": "4187:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_WadRayMath_$11252_$",
                                      "typeString": "type(library WadRayMath)"
                                    }
                                  },
                                  "id": 8984,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "RAY",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 10957,
                                  "src": "4187:14:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "arguments": [
                                    {
                                      "id": 8987,
                                      "name": "oldValue",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8938,
                                      "src": "4220:8:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8985,
                                      "name": "newValue",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8940,
                                      "src": "4204:8:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8986,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "rayDiv",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11193,
                                    "src": "4204:15:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8988,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4204:25:10",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4187:42:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 8990,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "4186:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "id": 8991,
                            "name": "maxTweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8942,
                            "src": "4234:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4186:56:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 8946,
                        "id": 8993,
                        "nodeType": "Return",
                        "src": "4179:63:10"
                      }
                    ]
                  },
                  "id": 8995,
                  "nodeType": "IfStatement",
                  "src": "4062:187:10",
                  "trueBody": {
                    "id": 8982,
                    "nodeType": "Block",
                    "src": "4087:78:10",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 8980,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 8977,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "arguments": [
                                    {
                                      "id": 8973,
                                      "name": "oldValue",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8938,
                                      "src": "4119:8:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 8971,
                                      "name": "newValue",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8940,
                                      "src": "4103:8:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 8972,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "rayDiv",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11193,
                                    "src": "4103:15:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 8974,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4103:25:10",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "expression": {
                                    "id": 8975,
                                    "name": "WadRayMath",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11252,
                                    "src": "4131:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_WadRayMath_$11252_$",
                                      "typeString": "type(library WadRayMath)"
                                    }
                                  },
                                  "id": 8976,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "RAY",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 10957,
                                  "src": "4131:14:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4103:42:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 8978,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "4102:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "id": 8979,
                            "name": "maxTweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8942,
                            "src": "4150:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4102:56:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 8946,
                        "id": 8981,
                        "nodeType": "Return",
                        "src": "4095:63:10"
                      }
                    ]
                  }
                }
              ]
            },
            "id": 8997,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_isTweakRay",
            "nameLocation": "3807:11:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 8943,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8938,
                  "mutability": "mutable",
                  "name": "oldValue",
                  "nameLocation": "3832:8:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8997,
                  "src": "3824:16:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8937,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3824:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8940,
                  "mutability": "mutable",
                  "name": "newValue",
                  "nameLocation": "3854:8:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8997,
                  "src": "3846:16:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8939,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3846:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 8942,
                  "mutability": "mutable",
                  "name": "maxTweak",
                  "nameLocation": "3876:8:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 8997,
                  "src": "3868:16:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8941,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3868:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3818:70:10"
            },
            "returnParameters": {
              "id": 8946,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8945,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 8997,
                  "src": "3912:4:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 8944,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3912:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3911:6:10"
            },
            "scope": 9172,
            "src": "3798:455:10",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 9057,
              "nodeType": "Block",
              "src": "4377:335:10",
              "statements": [
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9010,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 9008,
                      "name": "oldValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8999,
                      "src": "4387:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "id": 9009,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9001,
                      "src": "4399:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4387:20:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 9013,
                  "nodeType": "IfStatement",
                  "src": "4383:37:10",
                  "trueBody": {
                    "expression": {
                      "hexValue": "74727565",
                      "id": 9011,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "bool",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "4416:4:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "value": "true"
                    },
                    "functionReturnParameters": 9007,
                    "id": 9012,
                    "nodeType": "Return",
                    "src": "4409:11:10"
                  }
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9016,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 9014,
                      "name": "oldValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8999,
                      "src": "4430:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 9015,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "4442:1:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "4430:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 9022,
                  "nodeType": "IfStatement",
                  "src": "4426:52:10",
                  "trueBody": {
                    "expression": {
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 9020,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "id": 9017,
                        "name": "maxTweak",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9003,
                        "src": "4452:8:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": ">=",
                      "rightExpression": {
                        "expression": {
                          "id": 9018,
                          "name": "WadRayMath",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 11252,
                          "src": "4464:10:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_contract$_WadRayMath_$11252_$",
                            "typeString": "type(library WadRayMath)"
                          }
                        },
                        "id": 9019,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "WAD",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 10949,
                        "src": "4464:14:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "4452:26:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "functionReturnParameters": 9007,
                    "id": 9021,
                    "nodeType": "Return",
                    "src": "4445:33:10"
                  }
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9025,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 9023,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9001,
                      "src": "4488:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "hexValue": "30",
                      "id": 9024,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "4500:1:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "4488:13:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 9028,
                  "nodeType": "IfStatement",
                  "src": "4484:31:10",
                  "trueBody": {
                    "expression": {
                      "hexValue": "66616c7365",
                      "id": 9026,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "bool",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "4510:5:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      },
                      "value": "false"
                    },
                    "functionReturnParameters": 9007,
                    "id": 9027,
                    "nodeType": "Return",
                    "src": "4503:12:10"
                  }
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 9031,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "id": 9029,
                      "name": "oldValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8999,
                      "src": "4525:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "id": 9030,
                      "name": "newValue",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9001,
                      "src": "4536:8:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "4525:19:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 9055,
                    "nodeType": "Block",
                    "src": "4630:78:10",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 9053,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 9050,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "expression": {
                                    "id": 9044,
                                    "name": "WadRayMath",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11252,
                                    "src": "4646:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_WadRayMath_$11252_$",
                                      "typeString": "type(library WadRayMath)"
                                    }
                                  },
                                  "id": 9045,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "WAD",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 10949,
                                  "src": "4646:14:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "arguments": [
                                    {
                                      "id": 9048,
                                      "name": "oldValue",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8999,
                                      "src": "4679:8:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 9046,
                                      "name": "newValue",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9001,
                                      "src": "4663:8:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9047,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "wadDiv",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11097,
                                    "src": "4663:15:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9049,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4663:25:10",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4646:42:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 9051,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "4645:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "id": 9052,
                            "name": "maxTweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9003,
                            "src": "4693:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4645:56:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 9007,
                        "id": 9054,
                        "nodeType": "Return",
                        "src": "4638:63:10"
                      }
                    ]
                  },
                  "id": 9056,
                  "nodeType": "IfStatement",
                  "src": "4521:187:10",
                  "trueBody": {
                    "id": 9043,
                    "nodeType": "Block",
                    "src": "4546:78:10",
                    "statements": [
                      {
                        "expression": {
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 9041,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 9038,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "arguments": [
                                    {
                                      "id": 9034,
                                      "name": "oldValue",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 8999,
                                      "src": "4578:8:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "expression": {
                                      "id": 9032,
                                      "name": "newValue",
                                      "nodeType": "Identifier",
                                      "overloadedDeclarations": [],
                                      "referencedDeclaration": 9001,
                                      "src": "4562:8:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    },
                                    "id": 9033,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": false,
                                    "lValueRequested": false,
                                    "memberName": "wadDiv",
                                    "nodeType": "MemberAccess",
                                    "referencedDeclaration": 11097,
                                    "src": "4562:15:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                      "typeString": "function (uint256,uint256) pure returns (uint256)"
                                    }
                                  },
                                  "id": 9035,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "functionCall",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "4562:25:10",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "expression": {
                                    "id": 9036,
                                    "name": "WadRayMath",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 11252,
                                    "src": "4590:10:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_contract$_WadRayMath_$11252_$",
                                      "typeString": "type(library WadRayMath)"
                                    }
                                  },
                                  "id": 9037,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "WAD",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": 10949,
                                  "src": "4590:14:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "4562:42:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 9039,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "4561:44:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "id": 9040,
                            "name": "maxTweak",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9003,
                            "src": "4609:8:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "4561:56:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "functionReturnParameters": 9007,
                        "id": 9042,
                        "nodeType": "Return",
                        "src": "4554:63:10"
                      }
                    ]
                  }
                }
              ]
            },
            "id": 9058,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_isTweakWad",
            "nameLocation": "4266:11:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9004,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 8999,
                  "mutability": "mutable",
                  "name": "oldValue",
                  "nameLocation": "4291:8:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 9058,
                  "src": "4283:16:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 8998,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4283:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9001,
                  "mutability": "mutable",
                  "name": "newValue",
                  "nameLocation": "4313:8:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 9058,
                  "src": "4305:16:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9000,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4305:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9003,
                  "mutability": "mutable",
                  "name": "maxTweak",
                  "nameLocation": "4335:8:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 9058,
                  "src": "4327:16:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9002,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4327:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4277:70:10"
            },
            "returnParameters": {
              "id": 9007,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9006,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 9058,
                  "src": "4371:4:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 9005,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4371:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4370:6:10"
            },
            "scope": 9172,
            "src": "4257:455:10",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 9061,
              "nodeType": "Block",
              "src": "4816:2:10",
              "statements": []
            },
            "id": 9062,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_validateParameters",
            "nameLocation": "4772:19:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9059,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4791:2:10"
            },
            "returnParameters": {
              "id": 9060,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4816:0:10"
            },
            "scope": 9172,
            "src": "4763:55:10",
            "stateMutability": "view",
            "virtual": true,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 9086,
              "nodeType": "Block",
              "src": "4996:113:10",
              "statements": [
                {
                  "expression": {
                    "arguments": [],
                    "expression": {
                      "argumentTypes": [],
                      "id": 9072,
                      "name": "_validateParameters",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 9062,
                      "src": "5002:19:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$__$returns$__$",
                        "typeString": "function () view"
                      }
                    },
                    "id": 9073,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5002:21:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9074,
                  "nodeType": "ExpressionStatement",
                  "src": "5002:21:10"
                },
                {
                  "condition": {
                    "id": 9075,
                    "name": "tweak",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 9069,
                    "src": "5033:5:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 9080,
                  "nodeType": "IfStatement",
                  "src": "5029:33:10",
                  "trueBody": {
                    "expression": {
                      "arguments": [
                        {
                          "id": 9077,
                          "name": "action",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 9065,
                          "src": "5055:6:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                            "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                            "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                          }
                        ],
                        "id": 9076,
                        "name": "_registerTweak",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9171,
                        "src": "5040:14:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_internal_nonpayable$_t_enum$_GovernanceActions_$14718_$returns$__$",
                          "typeString": "function (enum IPolicyPoolConfig.GovernanceActions)"
                        }
                      },
                      "id": 9078,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5040:22:10",
                      "tryCall": false,
                      "typeDescriptions": {
                        "typeIdentifier": "t_tuple$__$",
                        "typeString": "tuple()"
                      }
                    },
                    "id": 9079,
                    "nodeType": "ExpressionStatement",
                    "src": "5040:22:10"
                  }
                },
                {
                  "eventCall": {
                    "arguments": [
                      {
                        "id": 9082,
                        "name": "action",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9065,
                        "src": "5090:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        }
                      },
                      {
                        "id": 9083,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 9067,
                        "src": "5098:5:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                          "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                        },
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 9081,
                      "name": "GovernanceAction",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8765,
                      "src": "5073:16:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_event_nonpayable$_t_enum$_GovernanceActions_$14718_$_t_uint256_$returns$__$",
                        "typeString": "function (enum IPolicyPoolConfig.GovernanceActions,uint256)"
                      }
                    },
                    "id": 9084,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5073:31:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 9085,
                  "nodeType": "EmitStatement",
                  "src": "5068:36:10"
                }
              ]
            },
            "id": 9087,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_parameterChanged",
            "nameLocation": "4882:17:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9070,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9065,
                  "mutability": "mutable",
                  "name": "action",
                  "nameLocation": "4941:6:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 9087,
                  "src": "4905:42:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                    "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                  },
                  "typeName": {
                    "id": 9064,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 9063,
                      "name": "IPolicyPoolConfig.GovernanceActions",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 14718,
                      "src": "4905:35:10"
                    },
                    "referencedDeclaration": 14718,
                    "src": "4905:35:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                      "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9067,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "4961:5:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 9087,
                  "src": "4953:13:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 9066,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4953:7:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9069,
                  "mutability": "mutable",
                  "name": "tweak",
                  "nameLocation": "4977:5:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 9087,
                  "src": "4972:10:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 9068,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4972:4:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4899:87:10"
            },
            "returnParameters": {
              "id": 9071,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4996:0:10"
            },
            "scope": 9172,
            "src": "4873:236:10",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 9098,
              "nodeType": "Block",
              "src": "5173:58:10",
              "statements": [
                {
                  "expression": {
                    "components": [
                      {
                        "id": 9094,
                        "name": "_lastTweakTimestamp",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8756,
                        "src": "5187:19:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint40",
                          "typeString": "uint40"
                        }
                      },
                      {
                        "id": 9095,
                        "name": "_lastTweakActions",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 8758,
                        "src": "5208:17:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint56",
                          "typeString": "uint56"
                        }
                      }
                    ],
                    "id": 9096,
                    "isConstant": false,
                    "isInlineArray": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "TupleExpression",
                    "src": "5186:40:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$_t_uint40_$_t_uint56_$",
                      "typeString": "tuple(uint40,uint56)"
                    }
                  },
                  "functionReturnParameters": 9093,
                  "id": 9097,
                  "nodeType": "Return",
                  "src": "5179:47:10"
                }
              ]
            },
            "functionSelector": "468a8c9f",
            "id": 9099,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "lastTweak",
            "nameLocation": "5122:9:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9088,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5131:2:10"
            },
            "returnParameters": {
              "id": 9093,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9090,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 9099,
                  "src": "5157:6:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint40",
                    "typeString": "uint40"
                  },
                  "typeName": {
                    "id": 9089,
                    "name": "uint40",
                    "nodeType": "ElementaryTypeName",
                    "src": "5157:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint40",
                      "typeString": "uint40"
                    }
                  },
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 9092,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 9099,
                  "src": "5165:6:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint56",
                    "typeString": "uint56"
                  },
                  "typeName": {
                    "id": 9091,
                    "name": "uint56",
                    "nodeType": "ElementaryTypeName",
                    "src": "5165:6:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint56",
                      "typeString": "uint56"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5156:16:10"
            },
            "scope": 9172,
            "src": "5113:118:10",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "external"
          },
          {
            "body": {
              "id": 9170,
              "nodeType": "Block",
              "src": "5312:546:10",
              "statements": [
                {
                  "assignments": [
                    9106
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 9106,
                      "mutability": "mutable",
                      "name": "actionBitMap",
                      "nameLocation": "5325:12:10",
                      "nodeType": "VariableDeclaration",
                      "scope": 9170,
                      "src": "5318:19:10",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint56",
                        "typeString": "uint56"
                      },
                      "typeName": {
                        "id": 9105,
                        "name": "uint56",
                        "nodeType": "ElementaryTypeName",
                        "src": "5318:6:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint56",
                          "typeString": "uint56"
                        }
                      },
                      "visibility": "internal"
                    }
                  ],
                  "id": 9119,
                  "initialValue": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 9117,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "hexValue": "31",
                          "id": 9109,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "5347:1:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1_by_1",
                            "typeString": "int_const 1"
                          },
                          "value": "1"
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<<",
                        "rightExpression": {
                          "components": [
                            {
                              "commonType": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              },
                              "id": 9115,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "arguments": [
                                  {
                                    "id": 9112,
                                    "name": "action",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 9102,
                                    "src": "5359:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                                      "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                                      "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                                    }
                                  ],
                                  "id": 9111,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "5353:5:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_uint8_$",
                                    "typeString": "type(uint8)"
                                  },
                                  "typeName": {
                                    "id": 9110,
                                    "name": "uint8",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5353:5:10",
                                    "typeDescriptions": {}
                                  }
                                },
                                "id": 9113,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5353:13:10",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint8",
                                  "typeString": "uint8"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "hexValue": "31",
                                "id": 9114,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "5369:1:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "5353:17:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint8",
                                "typeString": "uint8"
                              }
                            }
                          ],
                          "id": 9116,
                          "isConstant": false,
                          "isInlineArray": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "TupleExpression",
                          "src": "5352:19:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "src": "5347:24:10",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 9108,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "5340:6:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint56_$",
                        "typeString": "type(uint56)"
                      },
                      "typeName": {
                        "id": 9107,
                        "name": "uint56",
                        "nodeType": "ElementaryTypeName",
                        "src": "5340:6:10",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 9118,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5340:32:10",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint56",
                      "typeString": "uint56"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5318:54:10"
                },
                {
                  "condition": {
                    "commonType": {
                      "typeIdentifier": "t_uint40",
                      "typeString": "uint40"
                    },
                    "id": 9129,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "components": [
                        {
                          "commonType": {
                            "typeIdentifier": "t_uint40",
                            "typeString": "uint40"
                          },
                          "id": 9126,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 9122,
                                  "name": "block",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -4,
                                  "src": "5390:5:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_block",
                                    "typeString": "block"
                                  }
                                },
                                "id": 9123,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "timestamp",
                                "nodeType": "MemberAccess",
                                "src": "5390:15:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 9121,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "5383:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint40_$",
                                "typeString": "type(uint40)"
                              },
                              "typeName": {
                                "id": 9120,
                                "name": "uint40",
                                "nodeType": "ElementaryTypeName",
                                "src": "5383:6:10",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 9124,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5383:23:10",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint40",
                              "typeString": "uint40"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "id": 9125,
                            "name": "_lastTweakTimestamp",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8756,
                            "src": "5409:19:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint40",
                              "typeString": "uint40"
                            }
                          },
                          "src": "5383:45:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint40",
                            "typeString": "uint40"
                          }
                        }
                      ],
                      "id": 9127,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "5382:47:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint40",
                        "typeString": "uint40"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "id": 9128,
                      "name": "TWEAK_EXPIRATION",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 8750,
                      "src": "5432:16:10",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint40",
                        "typeString": "uint40"
                      }
                    },
                    "src": "5382:66:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 9168,
                    "nodeType": "Block",
                    "src": "5556:298:10",
                    "statements": [
                      {
                        "condition": {
                          "commonType": {
                            "typeIdentifier": "t_uint56",
                            "typeString": "uint56"
                          },
                          "id": 9148,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "components": [
                              {
                                "commonType": {
                                  "typeIdentifier": "t_uint56",
                                  "typeString": "uint56"
                                },
                                "id": 9145,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "id": 9143,
                                  "name": "actionBitMap",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9106,
                                  "src": "5569:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint56",
                                    "typeString": "uint56"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "&",
                                "rightExpression": {
                                  "id": 9144,
                                  "name": "_lastTweakActions",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8758,
                                  "src": "5584:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint56",
                                    "typeString": "uint56"
                                  }
                                },
                                "src": "5569:32:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint56",
                                  "typeString": "uint56"
                                }
                              }
                            ],
                            "id": 9146,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "5568:34:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint56",
                              "typeString": "uint56"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "hexValue": "30",
                            "id": 9147,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5606:1:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          },
                          "src": "5568:39:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 9166,
                          "nodeType": "Block",
                          "src": "5748:100:10",
                          "statements": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "hexValue": "596f7520616c726561647920747765616b6564207468697320706172616d6574657220726563656e746c792e2057616974206265666f726520747765616b696e6720616761696e",
                                    "id": 9163,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "string",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "5765:73:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_stringliteral_0f15561d57da944de3f3cf1366ce53f1feb311c7b3c13ea9ab22d5d1ee5fcef9",
                                      "typeString": "literal_string \"You already tweaked this parameter recently. Wait before tweaking again\""
                                    },
                                    "value": "You already tweaked this parameter recently. Wait before tweaking again"
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_stringliteral_0f15561d57da944de3f3cf1366ce53f1feb311c7b3c13ea9ab22d5d1ee5fcef9",
                                      "typeString": "literal_string \"You already tweaked this parameter recently. Wait before tweaking again\""
                                    }
                                  ],
                                  "id": 9162,
                                  "name": "revert",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [
                                    -19,
                                    -19
                                  ],
                                  "referencedDeclaration": -19,
                                  "src": "5758:6:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_revert_pure$_t_string_memory_ptr_$returns$__$",
                                    "typeString": "function (string memory) pure"
                                  }
                                },
                                "id": 9164,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5758:81:10",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_tuple$__$",
                                  "typeString": "tuple()"
                                }
                              },
                              "id": 9165,
                              "nodeType": "ExpressionStatement",
                              "src": "5758:81:10"
                            }
                          ]
                        },
                        "id": 9167,
                        "nodeType": "IfStatement",
                        "src": "5564:284:10",
                        "trueBody": {
                          "id": 9161,
                          "nodeType": "Block",
                          "src": "5609:133:10",
                          "statements": [
                            {
                              "expression": {
                                "id": 9151,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 9149,
                                  "name": "_lastTweakActions",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8758,
                                  "src": "5619:17:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint56",
                                    "typeString": "uint56"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "|=",
                                "rightHandSide": {
                                  "id": 9150,
                                  "name": "actionBitMap",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 9106,
                                  "src": "5640:12:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint56",
                                    "typeString": "uint56"
                                  }
                                },
                                "src": "5619:33:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint56",
                                  "typeString": "uint56"
                                }
                              },
                              "id": 9152,
                              "nodeType": "ExpressionStatement",
                              "src": "5619:33:10"
                            },
                            {
                              "expression": {
                                "id": 9159,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "id": 9153,
                                  "name": "_lastTweakTimestamp",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 8756,
                                  "src": "5662:19:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint40",
                                    "typeString": "uint40"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "arguments": [
                                    {
                                      "expression": {
                                        "id": 9156,
                                        "name": "block",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -4,
                                        "src": "5691:5:10",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_block",
                                          "typeString": "block"
                                        }
                                      },
                                      "id": 9157,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "timestamp",
                                      "nodeType": "MemberAccess",
                                      "src": "5691:15:10",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 9155,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "5684:6:10",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint40_$",
                                      "typeString": "type(uint40)"
                                    },
                                    "typeName": {
                                      "id": 9154,
                                      "name": "uint40",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "5684:6:10",
                                      "typeDescriptions": {}
                                    }
                                  },
                                  "id": 9158,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "5684:23:10",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint40",
                                    "typeString": "uint40"
                                  }
                                },
                                "src": "5662:45:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint40",
                                  "typeString": "uint40"
                                }
                              },
                              "id": 9160,
                              "nodeType": "ExpressionStatement",
                              "src": "5662:45:10"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "id": 9169,
                  "nodeType": "IfStatement",
                  "src": "5378:476:10",
                  "trueBody": {
                    "id": 9142,
                    "nodeType": "Block",
                    "src": "5450:100:10",
                    "statements": [
                      {
                        "expression": {
                          "id": 9136,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 9130,
                            "name": "_lastTweakTimestamp",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8756,
                            "src": "5458:19:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint40",
                              "typeString": "uint40"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "arguments": [
                              {
                                "expression": {
                                  "id": 9133,
                                  "name": "block",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": -4,
                                  "src": "5487:5:10",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_magic_block",
                                    "typeString": "block"
                                  }
                                },
                                "id": 9134,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "timestamp",
                                "nodeType": "MemberAccess",
                                "src": "5487:15:10",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "id": 9132,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "nodeType": "ElementaryTypeNameExpression",
                              "src": "5480:6:10",
                              "typeDescriptions": {
                                "typeIdentifier": "t_type$_t_uint40_$",
                                "typeString": "type(uint40)"
                              },
                              "typeName": {
                                "id": 9131,
                                "name": "uint40",
                                "nodeType": "ElementaryTypeName",
                                "src": "5480:6:10",
                                "typeDescriptions": {}
                              }
                            },
                            "id": 9135,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "typeConversion",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5480:23:10",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint40",
                              "typeString": "uint40"
                            }
                          },
                          "src": "5458:45:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint40",
                            "typeString": "uint40"
                          }
                        },
                        "id": 9137,
                        "nodeType": "ExpressionStatement",
                        "src": "5458:45:10"
                      },
                      {
                        "expression": {
                          "id": 9140,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "id": 9138,
                            "name": "_lastTweakActions",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 8758,
                            "src": "5511:17:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint56",
                              "typeString": "uint56"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "id": 9139,
                            "name": "actionBitMap",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 9106,
                            "src": "5531:12:10",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint56",
                              "typeString": "uint56"
                            }
                          },
                          "src": "5511:32:10",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint56",
                            "typeString": "uint56"
                          }
                        },
                        "id": 9141,
                        "nodeType": "ExpressionStatement",
                        "src": "5511:32:10"
                      }
                    ]
                  }
                }
              ]
            },
            "id": 9171,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "_registerTweak",
            "nameLocation": "5244:14:10",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 9103,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 9102,
                  "mutability": "mutable",
                  "name": "action",
                  "nameLocation": "5295:6:10",
                  "nodeType": "VariableDeclaration",
                  "scope": 9171,
                  "src": "5259:42:10",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                    "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                  },
                  "typeName": {
                    "id": 9101,
                    "nodeType": "UserDefinedTypeName",
                    "pathNode": {
                      "id": 9100,
                      "name": "IPolicyPoolConfig.GovernanceActions",
                      "nodeType": "IdentifierPath",
                      "referencedDeclaration": 14718,
                      "src": "5259:35:10"
                    },
                    "referencedDeclaration": 14718,
                    "src": "5259:35:10",
                    "typeDescriptions": {
                      "typeIdentifier": "t_enum$_GovernanceActions_$14718",
                      "typeString": "enum IPolicyPoolConfig.GovernanceActions"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5258:44:10"
            },
            "returnParameters": {
              "id": 9104,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5312:0:10"
            },
            "scope": 9172,
            "src": "5235:623:10",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 9173,
        "src": "1500:4360:10",
        "usedErrors": []
      }
    ],
    "src": "39:5822:10"
  },
  "bytecode": "",
  "bytecodeSha1": "da39a3ee5e6b4b0d3255bfef95601890afd80709",
  "compiler": {
    "evm_version": "istanbul",
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "version": "0.8.6+commit.11564f7e"
  },
  "contractName": "PolicyPoolComponent",
  "coverageMap": {
    "branches": {},
    "statements": {}
  },
  "dependencies": [
    "ContextUpgradeable",
    "ERC1967UpgradeUpgradeable",
    "IAssetManager",
    "IERC1822ProxiableUpgradeable",
    "IERC20Metadata",
    "IEToken",
    "IExchange",
    "IInsolvencyHook",
    "ILPWhitelist",
    "IPolicyPool",
    "IPolicyPoolComponent",
    "IPolicyPoolConfig",
    "IPriceOracle",
    "IRiskModule",
    "Initializable",
    "PausableUpgradeable",
    "UUPSUpgradeable",
    "WadRayMath"
  ],
  "deployedBytecode": "",
  "deployedSourceMap": "",
  "language": "Solidity",
  "natspec": {
    "author": "Ensuro",
    "custom:security-contact": "security@ensuro.co",
    "details": "This is the base class of all the components of the protocol that are linked to the PolicyPool and created      after it.      Holds the reference to _policyPool as immutable, also provides access to common admin roles:      - LEVEL1_ROLE: High impact changes like upgrades or other critical operations      - LEVEL2_ROLE: Mid-impact changes like adding new risk modules or changing some parameters      - LEVEL3_ROLE: Low-impact changes like changing some parameters up to given percentage (tweaks)      - GUARDIAN_ROLE: For emergency operations oriented to protect the protocol in case of attacks or hacking.      This contract also keeps track of the tweaks to avoid two tweaks of the same type are done in a short period.",
    "kind": "dev",
    "methods": {
      "constructor": {
        "custom:oz-upgrades-unsafe-allow": "constructor"
      },
      "paused()": {
        "details": "Returns true if the contract is paused, and false otherwise."
      },
      "proxiableUUID()": {
        "details": "Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate that the this implementation remains valid after an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier."
      },
      "upgradeTo(address)": {
        "details": "Upgrade the implementation of the proxy to `newImplementation`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event."
      },
      "upgradeToAndCall(address,bytes)": {
        "details": "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event."
      }
    },
    "stateVariables": {
      "_policyPool": {
        "custom:oz-upgrades-unsafe-allow": "state-variable-immutable"
      }
    },
    "title": "Base class for PolicyPool components",
    "version": 1
  },
  "offset": [
    1500,
    5860
  ],
  "opcodes": "",
  "pcMap": {},
  "sha1": "a484f55e9195b52d8d3e73a5fcaa354bc0ce74d6",
  "source": "// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.8.0;\n\nimport {UUPSUpgradeable} from \"@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol\";\nimport {IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\nimport {IPolicyPool} from \"../interfaces/IPolicyPool.sol\";\nimport {IPolicyPoolComponent} from \"../interfaces/IPolicyPoolComponent.sol\";\nimport {IPolicyPoolConfig} from \"../interfaces/IPolicyPoolConfig.sol\";\nimport {PausableUpgradeable} from \"@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol\";\nimport {WadRayMath} from \"./WadRayMath.sol\";\n\n/**\n * @title Base class for PolicyPool components\n * @dev This is the base class of all the components of the protocol that are linked to the PolicyPool and created\n *      after it.\n *      Holds the reference to _policyPool as immutable, also provides access to common admin roles:\n *      - LEVEL1_ROLE: High impact changes like upgrades or other critical operations\n *      - LEVEL2_ROLE: Mid-impact changes like adding new risk modules or changing some parameters\n *      - LEVEL3_ROLE: Low-impact changes like changing some parameters up to given percentage (tweaks)\n *      - GUARDIAN_ROLE: For emergency operations oriented to protect the protocol in case of attacks or hacking.\n *\n *      This contract also keeps track of the tweaks to avoid two tweaks of the same type are done in a short period.\n * @custom:security-contact security@ensuro.co\n * @author Ensuro\n */\nabstract contract PolicyPoolComponent is\n  UUPSUpgradeable,\n  PausableUpgradeable,\n  IPolicyPoolComponent\n{\n  using WadRayMath for uint256;\n\n  bytes32 public constant GUARDIAN_ROLE = keccak256(\"GUARDIAN_ROLE\");\n  bytes32 public constant LEVEL1_ROLE = keccak256(\"LEVEL1_ROLE\");\n  bytes32 public constant LEVEL2_ROLE = keccak256(\"LEVEL2_ROLE\");\n  bytes32 public constant LEVEL3_ROLE = keccak256(\"LEVEL3_ROLE\");\n\n  uint40 public constant TWEAK_EXPIRATION = 1 days;\n\n  /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\n  IPolicyPool internal immutable _policyPool;\n  uint40 internal _lastTweakTimestamp;\n  uint56 internal _lastTweakActions; // bitwise map of applied actions\n\n  event GovernanceAction(IPolicyPoolConfig.GovernanceActions indexed action, uint256 value);\n\n  modifier onlyPolicyPool() {\n    require(_msgSender() == address(_policyPool), \"The caller must be the PolicyPool\");\n    _;\n  }\n\n  modifier onlyPoolRole3(\n    bytes32 role1,\n    bytes32 role2,\n    bytes32 role3\n  ) {\n    if (!hasPoolRole(role1)) {\n      _policyPool.config().checkRole2(role2, role3, msg.sender);\n    }\n    _;\n  }\n\n  modifier onlyPoolRole2(bytes32 role1, bytes32 role2) {\n    _policyPool.config().checkRole2(role1, role2, msg.sender);\n    _;\n  }\n\n  modifier onlyPoolRole(bytes32 role) {\n    _policyPool.config().checkRole(role, msg.sender);\n    _;\n  }\n\n  /// @custom:oz-upgrades-unsafe-allow constructor\n  constructor(IPolicyPool policyPool_) {\n    _policyPool = policyPool_;\n  }\n\n  // solhint-disable-next-line func-name-mixedcase\n  function __PolicyPoolComponent_init() internal initializer {\n    __UUPSUpgradeable_init();\n    __Pausable_init();\n  }\n\n  // solhint-disable-next-line no-empty-blocks\n  function _authorizeUpgrade(address) internal override onlyPoolRole2(GUARDIAN_ROLE, LEVEL1_ROLE) {}\n\n  function pause() public onlyPoolRole(GUARDIAN_ROLE) {\n    _pause();\n  }\n\n  function unpause() public onlyPoolRole2(GUARDIAN_ROLE, LEVEL1_ROLE) {\n    _unpause();\n  }\n\n  function policyPool() public view override returns (IPolicyPool) {\n    return _policyPool;\n  }\n\n  function currency() public view returns (IERC20Metadata) {\n    return _policyPool.currency();\n  }\n\n  function hasPoolRole(bytes32 role) internal view returns (bool) {\n    return _policyPool.config().hasRole(role, msg.sender);\n  }\n\n  function _isTweakRay(\n    uint256 oldValue,\n    uint256 newValue,\n    uint256 maxTweak\n  ) internal pure returns (bool) {\n    if (oldValue == newValue) return true;\n    if (oldValue == 0) return maxTweak >= WadRayMath.RAY;\n    if (newValue == 0) return false;\n    if (oldValue < newValue) {\n      return (newValue.rayDiv(oldValue) - WadRayMath.RAY) <= maxTweak;\n    } else {\n      return (WadRayMath.RAY - newValue.rayDiv(oldValue)) <= maxTweak;\n    }\n  }\n\n  function _isTweakWad(\n    uint256 oldValue,\n    uint256 newValue,\n    uint256 maxTweak\n  ) internal pure returns (bool) {\n    if (oldValue == newValue) return true;\n    if (oldValue == 0) return maxTweak >= WadRayMath.WAD;\n    if (newValue == 0) return false;\n    if (oldValue < newValue) {\n      return (newValue.wadDiv(oldValue) - WadRayMath.WAD) <= maxTweak;\n    } else {\n      return (WadRayMath.WAD - newValue.wadDiv(oldValue)) <= maxTweak;\n    }\n  }\n\n  // solhint-disable-next-line no-empty-blocks\n  function _validateParameters() internal view virtual {} // Must be reimplemented with specific validations\n\n  function _parameterChanged(\n    IPolicyPoolConfig.GovernanceActions action,\n    uint256 value,\n    bool tweak\n  ) internal {\n    _validateParameters();\n    if (tweak) _registerTweak(action);\n    emit GovernanceAction(action, value);\n  }\n\n  function lastTweak() external view returns (uint40, uint56) {\n    return (_lastTweakTimestamp, _lastTweakActions);\n  }\n\n  function _registerTweak(IPolicyPoolConfig.GovernanceActions action) internal {\n    uint56 actionBitMap = uint56(1 << (uint8(action) - 1));\n    if ((uint40(block.timestamp) - _lastTweakTimestamp) > TWEAK_EXPIRATION) {\n      _lastTweakTimestamp = uint40(block.timestamp);\n      _lastTweakActions = actionBitMap;\n    } else {\n      if ((actionBitMap & _lastTweakActions) == 0) {\n        _lastTweakActions |= actionBitMap;\n        _lastTweakTimestamp = uint40(block.timestamp); // Updates the expiration\n      } else {\n        revert(\"You already tweaked this parameter recently. Wait before tweaking again\");\n      }\n    }\n  }\n}\n",
  "sourceMap": "",
  "sourcePath": "contracts/PolicyPoolComponent.sol",
  "type": "contract"
}