{
  "contractName": "KeepFactorySelector",
  "abi": [
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_seed",
          "type": "uint256"
        },
        {
          "internalType": "contract IBondedECDSAKeepFactory",
          "name": "_keepStakedFactory",
          "type": "address"
        },
        {
          "internalType": "contract IBondedECDSAKeepFactory",
          "name": "_fullyBackedFactory",
          "type": "address"
        }
      ],
      "name": "selectFactory",
      "outputs": [
        {
          "internalType": "contract IBondedECDSAKeepFactory",
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.17+commit.d19bba13\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_seed\",\"type\":\"uint256\"},{\"internalType\":\"contract IBondedECDSAKeepFactory\",\"name\":\"_keepStakedFactory\",\"type\":\"address\"},{\"internalType\":\"contract IBondedECDSAKeepFactory\",\"name\":\"_fullyBackedFactory\",\"type\":\"address\"}],\"name\":\"selectFactory\",\"outputs\":[{\"internalType\":\"contract IBondedECDSAKeepFactory\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"selectFactory(uint256,address,address)\":{\"params\":{\"_fullyBackedFactory\":\"Fully backed, ETH-bond-only based keep factory.\",\"_keepStakedFactory\":\"Regular, KEEP-stake based keep factory.\",\"_seed\":\"Request seed.\"},\"return\":\"The selected keep factory.\"}},\"title\":\"Bonded ECDSA keep factory selection strategy.\"},\"userdoc\":{\"methods\":{\"selectFactory(uint256,address,address)\":{\"notice\":\"Selects keep factory for the new deposit.\"}},\"notice\":\"The strategy defines the algorithm for selecting a factory. tBTC uses two bonded ECDSA keep factories, selecting one of them for each new deposit being opened.\"}},\"settings\":{\"compilationTarget\":{\"/home/runner/work/tbtc/tbtc/solidity/contracts/system/KeepFactorySelection.sol\":\"KeepFactorySelector\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/runner/work/tbtc/tbtc/solidity/contracts/system/KeepFactorySelection.sol\":{\"keccak256\":\"0x26d39ca282d933df1c349ab52be37c19af9f4f8d24f0fb25700ef221a8294d6f\",\"urls\":[\"bzz-raw://fc25c76e38172ca0e12f51aecc53ed498c3b1a6900b0f358f3404c5df22fc40b\",\"dweb:/ipfs/QmQvHwrufw7UaKkVmf15xvFXgSFYzNua2abFpQLjzibnV3\"]},\"@keep-network/keep-ecdsa/contracts/api/IBondedECDSAKeepFactory.sol\":{\"keccak256\":\"0x07ae883d2a0f5b7fe2c0b055206f565da51b04d1ca574ae4d4da3a19e6badcdb\",\"urls\":[\"bzz-raw://038b4f5b45b2d676ef7411b69cadd490d5789e3d245afd78aaa72177ce042572\",\"dweb:/ipfs/QmRaBYU4HCDSH33a3gpLN4t2TsyNaFRxLKv3WeAZEgk9Rr\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "pragma solidity 0.5.17;\n\nimport {\n    IBondedECDSAKeepFactory\n} from \"@keep-network/keep-ecdsa/contracts/api/IBondedECDSAKeepFactory.sol\";\n\n/// @title Bonded ECDSA keep factory selection strategy.\n/// @notice The strategy defines the algorithm for selecting a factory. tBTC\n/// uses two bonded ECDSA keep factories, selecting one of them for each new\n/// deposit being opened.\ninterface KeepFactorySelector {\n    /// @notice Selects keep factory for the new deposit.\n    /// @param _seed Request seed.\n    /// @param _keepStakedFactory Regular, KEEP-stake based keep factory.\n    /// @param _fullyBackedFactory Fully backed, ETH-bond-only based keep factory.\n    /// @return The selected keep factory.\n    function selectFactory(\n        uint256 _seed,\n        IBondedECDSAKeepFactory _keepStakedFactory,\n        IBondedECDSAKeepFactory _fullyBackedFactory\n    ) external view returns (IBondedECDSAKeepFactory);\n}\n\n/// @title Bonded ECDSA keep factory selection library.\n/// @notice tBTC uses two bonded ECDSA keep factories: one based on KEEP stake\n/// and ETH bond, and another based only on ETH bond. The library holds\n/// a reference to both factories as well as a reference to a selection strategy\n/// deciding which factory to choose for the new deposit being opened.\nlibrary KeepFactorySelection {\n    struct Storage {\n        uint256 requestCounter;\n        IBondedECDSAKeepFactory selectedFactory;\n        KeepFactorySelector factorySelector;\n        // Standard ECDSA keep factory: KEEP stake and ETH bond.\n        // Guaranteed to be set for initialized factory.\n        IBondedECDSAKeepFactory keepStakedFactory;\n        // Fully backed ECDSA keep factory: ETH bond only.\n        IBondedECDSAKeepFactory fullyBackedFactory;\n    }\n\n    /// @notice Initializes the library with the default KEEP-stake-based\n    /// factory. The default factory is guaranteed to be set and this function\n    /// must be called when creating contract using this library.\n    /// @dev This function can be called only one time.\n    function initialize(\n        Storage storage _self,\n        IBondedECDSAKeepFactory _defaultFactory\n    ) public {\n        require(\n            address(_self.keepStakedFactory) == address(0),\n            \"Already initialized\"\n        );\n\n        _self.keepStakedFactory = IBondedECDSAKeepFactory(_defaultFactory);\n        _self.selectedFactory = _self.keepStakedFactory;\n    }\n\n    /// @notice Returns the selected keep factory.\n    /// This function guarantees that the same factory is returned for every\n    /// call until selectFactoryAndRefresh is executed. This lets to evaluate\n    /// open keep fee estimate on the same factory that will be used later for\n    /// opening a new keep (fee estimate and open keep requests are two\n    /// separate calls).\n    /// @return Selected keep factory. The same vale will be returned for every\n    /// call of this function until selectFactoryAndRefresh is executed.\n    function selectFactory(Storage storage _self)\n        public\n        view\n        returns (IBondedECDSAKeepFactory)\n    {\n        return _self.selectedFactory;\n    }\n\n    /// @notice Returns the selected keep factory and refreshes the choice\n    /// for the next select call. The value returned by this function has been\n    /// evaluated during the previous call. This lets to return the same value\n    /// from selectFactory and selectFactoryAndRefresh, thus, allowing to use\n    /// the same factory for which open keep fee estimate was evaluated (fee\n    /// estimate and open keep requests are two separate calls).\n    /// @return Selected keep factory.\n    function selectFactoryAndRefresh(Storage storage _self)\n        external\n        returns (IBondedECDSAKeepFactory)\n    {\n        IBondedECDSAKeepFactory factory = selectFactory(_self);\n        refreshFactory(_self);\n\n        return factory;\n    }\n\n    /// @notice Sets the minimum bondable value required from the operator to\n    /// join the sortition pool for tBTC.\n    /// @param _minimumBondableValue The minimum bond value the application\n    /// requires from a single keep.\n    /// @param _groupSize Number of signers in the keep.\n    /// @param _honestThreshold Minimum number of honest keep signers.\n    function setMinimumBondableValue(\n        Storage storage _self,\n        uint256 _minimumBondableValue,\n        uint256 _groupSize,\n        uint256 _honestThreshold\n    ) external {\n        if (address(_self.keepStakedFactory) != address(0)) {\n            _self.keepStakedFactory.setMinimumBondableValue(\n                _minimumBondableValue,\n                _groupSize,\n                _honestThreshold\n            );\n        }\n        if (address(_self.fullyBackedFactory) != address(0)) {\n            _self.fullyBackedFactory.setMinimumBondableValue(\n                _minimumBondableValue,\n                _groupSize,\n                _honestThreshold\n            );\n        }\n    }\n\n    /// @notice Refreshes the keep factory choice. If either ETH-bond-only factory\n    /// or selection strategy is not set, KEEP-stake factory is selected.\n    /// Otherwise, calls selection strategy providing addresses of both\n    /// factories to make a choice. Additionally, passes the selection seed\n    /// evaluated from the current request counter value.\n    function refreshFactory(Storage storage _self) internal {\n        if (\n            address(_self.fullyBackedFactory) == address(0) ||\n            address(_self.factorySelector) == address(0)\n        ) {\n            // KEEP-stake factory is guaranteed to be there. If the selection\n            // can not be performed, this is the default choice.\n            _self.selectedFactory = _self.keepStakedFactory;\n            return;\n        }\n\n        _self.requestCounter++;\n        uint256 seed =\n            uint256(\n                keccak256(abi.encodePacked(address(this), _self.requestCounter))\n            );\n        _self.selectedFactory = _self.factorySelector.selectFactory(\n            seed,\n            _self.keepStakedFactory,\n            _self.fullyBackedFactory\n        );\n\n        require(\n            _self.selectedFactory == _self.keepStakedFactory ||\n                _self.selectedFactory == _self.fullyBackedFactory,\n            \"Factory selector returned unknown factory\"\n        );\n    }\n\n    /// @notice Sets addresses of the keep factories and the selection strategy\n    /// contracts.\n    /// KeepFactorySelection can work without the keep factory selection\n    /// strategy set, always selecting the default KEEP-stake-based factory.\n    /// Once both fully-backed keep factory and factory selection strategy are\n    /// set, KEEP-stake-based factory is no longer the default choice and it is\n    /// up to the selection strategy to decide which factory should be chosen.\n    /// @dev Can be called multiple times! It's responsibility of a contract\n    /// using this library to limit and protect updates.\n    /// @param _keepStakedFactory Address of the regular, KEEP-stake based keep\n    /// factory.\n    /// @param _fullyBackedFactory Address of the fully-backed, ETH-bond-only based\n    /// keep factory.\n    /// @param _factorySelector Address of the keep factory selection strategy.\n    function setFactories(\n        Storage storage _self,\n        address _keepStakedFactory,\n        address _fullyBackedFactory,\n        address _factorySelector\n    ) internal {\n        require(\n            address(_keepStakedFactory) != address(0),\n            \"Invalid KEEP-staked factory address\"\n        );\n\n        _self.keepStakedFactory = IBondedECDSAKeepFactory(_keepStakedFactory);\n        _self.fullyBackedFactory = IBondedECDSAKeepFactory(_fullyBackedFactory);\n        _self.factorySelector = KeepFactorySelector(_factorySelector);\n    }\n}\n",
  "sourcePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/KeepFactorySelection.sol",
  "ast": {
    "absolutePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/KeepFactorySelection.sol",
    "exportedSymbols": {
      "KeepFactorySelection": [
        6575
      ],
      "KeepFactorySelector": [
        6316
      ]
    },
    "id": 6576,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6302,
        "literals": [
          "solidity",
          "0.5",
          ".17"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:20"
      },
      {
        "absolutePath": "@keep-network/keep-ecdsa/contracts/api/IBondedECDSAKeepFactory.sol",
        "file": "@keep-network/keep-ecdsa/contracts/api/IBondedECDSAKeepFactory.sol",
        "id": 6304,
        "nodeType": "ImportDirective",
        "scope": 6576,
        "sourceUnit": 11468,
        "src": "25:113:20",
        "symbolAliases": [
          {
            "foreign": 6303,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "interface",
        "documentation": "@title Bonded ECDSA keep factory selection strategy.\n @notice The strategy defines the algorithm for selecting a factory. tBTC\n uses two bonded ECDSA keep factories, selecting one of them for each new\n deposit being opened.",
        "fullyImplemented": false,
        "id": 6316,
        "linearizedBaseContracts": [
          6316
        ],
        "name": "KeepFactorySelector",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": null,
            "documentation": "@notice Selects keep factory for the new deposit.\n @param _seed Request seed.\n @param _keepStakedFactory Regular, KEEP-stake based keep factory.\n @param _fullyBackedFactory Fully backed, ETH-bond-only based keep factory.\n @return The selected keep factory.",
            "id": 6315,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "selectFactory",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6311,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6306,
                  "name": "_seed",
                  "nodeType": "VariableDeclaration",
                  "scope": 6315,
                  "src": "738:13:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6305,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "738:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6308,
                  "name": "_keepStakedFactory",
                  "nodeType": "VariableDeclaration",
                  "scope": 6315,
                  "src": "761:42:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6307,
                    "name": "IBondedECDSAKeepFactory",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11467,
                    "src": "761:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6310,
                  "name": "_fullyBackedFactory",
                  "nodeType": "VariableDeclaration",
                  "scope": 6315,
                  "src": "813:43:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6309,
                    "name": "IBondedECDSAKeepFactory",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11467,
                    "src": "813:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "728:134:20"
            },
            "returnParameters": {
              "id": 6314,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6313,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6315,
                  "src": "886:23:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6312,
                    "name": "IBondedECDSAKeepFactory",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11467,
                    "src": "886:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "885:25:20"
            },
            "scope": 6316,
            "src": "706:205:20",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          }
        ],
        "scope": 6576,
        "src": "377:536:20"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": "@title Bonded ECDSA keep factory selection library.\n @notice tBTC uses two bonded ECDSA keep factories: one based on KEEP stake\n and ETH bond, and another based only on ETH bond. The library holds\n a reference to both factories as well as a reference to a selection strategy\n deciding which factory to choose for the new deposit being opened.",
        "fullyImplemented": true,
        "id": 6575,
        "linearizedBaseContracts": [
          6575
        ],
        "name": "KeepFactorySelection",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "canonicalName": "KeepFactorySelection.Storage",
            "id": 6327,
            "members": [
              {
                "constant": false,
                "id": 6318,
                "name": "requestCounter",
                "nodeType": "VariableDeclaration",
                "scope": 6327,
                "src": "1334:22:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_uint256",
                  "typeString": "uint256"
                },
                "typeName": {
                  "id": 6317,
                  "name": "uint256",
                  "nodeType": "ElementaryTypeName",
                  "src": "1334:7:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 6320,
                "name": "selectedFactory",
                "nodeType": "VariableDeclaration",
                "scope": 6327,
                "src": "1366:39:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                  "typeString": "contract IBondedECDSAKeepFactory"
                },
                "typeName": {
                  "contractScope": null,
                  "id": 6319,
                  "name": "IBondedECDSAKeepFactory",
                  "nodeType": "UserDefinedTypeName",
                  "referencedDeclaration": 11467,
                  "src": "1366:23:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 6322,
                "name": "factorySelector",
                "nodeType": "VariableDeclaration",
                "scope": 6327,
                "src": "1415:35:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                  "typeString": "contract KeepFactorySelector"
                },
                "typeName": {
                  "contractScope": null,
                  "id": 6321,
                  "name": "KeepFactorySelector",
                  "nodeType": "UserDefinedTypeName",
                  "referencedDeclaration": 6316,
                  "src": "1415:19:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                    "typeString": "contract KeepFactorySelector"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 6324,
                "name": "keepStakedFactory",
                "nodeType": "VariableDeclaration",
                "scope": 6327,
                "src": "1582:41:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                  "typeString": "contract IBondedECDSAKeepFactory"
                },
                "typeName": {
                  "contractScope": null,
                  "id": 6323,
                  "name": "IBondedECDSAKeepFactory",
                  "nodeType": "UserDefinedTypeName",
                  "referencedDeclaration": 11467,
                  "src": "1582:23:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  }
                },
                "value": null,
                "visibility": "internal"
              },
              {
                "constant": false,
                "id": 6326,
                "name": "fullyBackedFactory",
                "nodeType": "VariableDeclaration",
                "scope": 6327,
                "src": "1692:42:20",
                "stateVariable": false,
                "storageLocation": "default",
                "typeDescriptions": {
                  "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                  "typeString": "contract IBondedECDSAKeepFactory"
                },
                "typeName": {
                  "contractScope": null,
                  "id": 6325,
                  "name": "IBondedECDSAKeepFactory",
                  "nodeType": "UserDefinedTypeName",
                  "referencedDeclaration": 11467,
                  "src": "1692:23:20",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  }
                },
                "value": null,
                "visibility": "internal"
              }
            ],
            "name": "Storage",
            "nodeType": "StructDefinition",
            "scope": 6575,
            "src": "1309:432:20",
            "visibility": "public"
          },
          {
            "body": {
              "id": 6361,
              "nodeType": "Block",
              "src": "2135:263:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 6342,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 6336,
                                "name": "_self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6329,
                                "src": "2174:5:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                  "typeString": "struct KeepFactorySelection.Storage storage pointer"
                                }
                              },
                              "id": 6337,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "keepStakedFactory",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 6324,
                              "src": "2174:23:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                "typeString": "contract IBondedECDSAKeepFactory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                "typeString": "contract IBondedECDSAKeepFactory"
                              }
                            ],
                            "id": 6335,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "2166:7:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 6338,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2166:32:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "==",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 6340,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2210:1:20",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 6339,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "2202:7:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 6341,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2202:10:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "src": "2166:46:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "416c726561647920696e697469616c697a6564",
                        "id": 6343,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2226:21:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_d3814fd4e72cfd7651525eee846049aca388165c613a1085fb56751abcdd36c0",
                          "typeString": "literal_string \"Already initialized\""
                        },
                        "value": "Already initialized"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_d3814fd4e72cfd7651525eee846049aca388165c613a1085fb56751abcdd36c0",
                          "typeString": "literal_string \"Already initialized\""
                        }
                      ],
                      "id": 6334,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "2145:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6344,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2145:112:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6345,
                  "nodeType": "ExpressionStatement",
                  "src": "2145:112:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 6352,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6346,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6329,
                        "src": "2268:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      },
                      "id": 6348,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "keepStakedFactory",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6324,
                      "src": "2268:23:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 6350,
                          "name": "_defaultFactory",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6331,
                          "src": "2318:15:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        ],
                        "id": 6349,
                        "name": "IBondedECDSAKeepFactory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 11467,
                        "src": "2294:23:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_IBondedECDSAKeepFactory_$11467_$",
                          "typeString": "type(contract IBondedECDSAKeepFactory)"
                        }
                      },
                      "id": 6351,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "2294:40:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "src": "2268:66:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "id": 6353,
                  "nodeType": "ExpressionStatement",
                  "src": "2268:66:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 6359,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6354,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6329,
                        "src": "2344:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      },
                      "id": 6356,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "selectedFactory",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6320,
                      "src": "2344:21:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6357,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6329,
                        "src": "2368:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      },
                      "id": 6358,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "keepStakedFactory",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6324,
                      "src": "2368:23:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "src": "2344:47:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "id": 6360,
                  "nodeType": "ExpressionStatement",
                  "src": "2344:47:20"
                }
              ]
            },
            "documentation": "@notice Initializes the library with the default KEEP-stake-based\n factory. The default factory is guaranteed to be set and this function\n must be called when creating contract using this library.\n @dev This function can be called only one time.",
            "id": 6362,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "initialize",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6332,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6329,
                  "name": "_self",
                  "nodeType": "VariableDeclaration",
                  "scope": 6362,
                  "src": "2051:21:20",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                    "typeString": "struct KeepFactorySelection.Storage"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6328,
                    "name": "Storage",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6327,
                    "src": "2051:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                      "typeString": "struct KeepFactorySelection.Storage"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6331,
                  "name": "_defaultFactory",
                  "nodeType": "VariableDeclaration",
                  "scope": 6362,
                  "src": "2082:39:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6330,
                    "name": "IBondedECDSAKeepFactory",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11467,
                    "src": "2082:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2041:86:20"
            },
            "returnParameters": {
              "id": 6333,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "2135:0:20"
            },
            "scope": 6575,
            "src": "2022:376:20",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 6372,
              "nodeType": "Block",
              "src": "3059:45:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "id": 6369,
                      "name": "_self",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6364,
                      "src": "3076:5:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                        "typeString": "struct KeepFactorySelection.Storage storage pointer"
                      }
                    },
                    "id": 6370,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "selectedFactory",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 6320,
                    "src": "3076:21:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "functionReturnParameters": 6368,
                  "id": 6371,
                  "nodeType": "Return",
                  "src": "3069:28:20"
                }
              ]
            },
            "documentation": "@notice Returns the selected keep factory.\n This function guarantees that the same factory is returned for every\n call until selectFactoryAndRefresh is executed. This lets to evaluate\n open keep fee estimate on the same factory that will be used later for\n opening a new keep (fee estimate and open keep requests are two\n separate calls).\n @return Selected keep factory. The same vale will be returned for every\n call of this function until selectFactoryAndRefresh is executed.",
            "id": 6373,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "selectFactory",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6365,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6364,
                  "name": "_self",
                  "nodeType": "VariableDeclaration",
                  "scope": 6373,
                  "src": "2962:21:20",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                    "typeString": "struct KeepFactorySelection.Storage"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6363,
                    "name": "Storage",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6327,
                    "src": "2962:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                      "typeString": "struct KeepFactorySelection.Storage"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2961:23:20"
            },
            "returnParameters": {
              "id": 6368,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6367,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6373,
                  "src": "3030:23:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6366,
                    "name": "IBondedECDSAKeepFactory",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11467,
                    "src": "3030:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3029:25:20"
            },
            "scope": 6575,
            "src": "2939:165:20",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "public"
          },
          {
            "body": {
              "id": 6392,
              "nodeType": "Block",
              "src": "3721:127:20",
              "statements": [
                {
                  "assignments": [
                    6381
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6381,
                      "name": "factory",
                      "nodeType": "VariableDeclaration",
                      "scope": 6392,
                      "src": "3731:31:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      },
                      "typeName": {
                        "contractScope": null,
                        "id": 6380,
                        "name": "IBondedECDSAKeepFactory",
                        "nodeType": "UserDefinedTypeName",
                        "referencedDeclaration": 11467,
                        "src": "3731:23:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                          "typeString": "contract IBondedECDSAKeepFactory"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6385,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6383,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6375,
                        "src": "3779:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      ],
                      "id": 6382,
                      "name": "selectFactory",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6373,
                      "src": "3765:13:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_view$_t_struct$_Storage_$6327_storage_ptr_$returns$_t_contract$_IBondedECDSAKeepFactory_$11467_$",
                        "typeString": "function (struct KeepFactorySelection.Storage storage pointer) view returns (contract IBondedECDSAKeepFactory)"
                      }
                    },
                    "id": 6384,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3765:20:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "3731:54:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 6387,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6375,
                        "src": "3810:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      ],
                      "id": 6386,
                      "name": "refreshFactory",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 6527,
                      "src": "3795:14:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_internal_nonpayable$_t_struct$_Storage_$6327_storage_ptr_$returns$__$",
                        "typeString": "function (struct KeepFactorySelection.Storage storage pointer)"
                      }
                    },
                    "id": 6388,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3795:21:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6389,
                  "nodeType": "ExpressionStatement",
                  "src": "3795:21:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 6390,
                    "name": "factory",
                    "nodeType": "Identifier",
                    "overloadedDeclarations": [],
                    "referencedDeclaration": 6381,
                    "src": "3834:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "functionReturnParameters": 6379,
                  "id": 6391,
                  "nodeType": "Return",
                  "src": "3827:14:20"
                }
              ]
            },
            "documentation": "@notice Returns the selected keep factory and refreshes the choice\n for the next select call. The value returned by this function has been\n evaluated during the previous call. This lets to return the same value\n from selectFactory and selectFactoryAndRefresh, thus, allowing to use\n the same factory for which open keep fee estimate was evaluated (fee\n estimate and open keep requests are two separate calls).\n @return Selected keep factory.",
            "id": 6393,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "selectFactoryAndRefresh",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6376,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6375,
                  "name": "_self",
                  "nodeType": "VariableDeclaration",
                  "scope": 6393,
                  "src": "3635:21:20",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                    "typeString": "struct KeepFactorySelection.Storage"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6374,
                    "name": "Storage",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6327,
                    "src": "3635:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                      "typeString": "struct KeepFactorySelection.Storage"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3634:23:20"
            },
            "returnParameters": {
              "id": 6379,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6378,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6393,
                  "src": "3692:23:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                    "typeString": "contract IBondedECDSAKeepFactory"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6377,
                    "name": "IBondedECDSAKeepFactory",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11467,
                    "src": "3692:23:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3691:25:20"
            },
            "scope": 6575,
            "src": "3602:246:20",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": {
              "id": 6444,
              "nodeType": "Block",
              "src": "4395:505:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 6411,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 6405,
                            "name": "_self",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6395,
                            "src": "4417:5:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                              "typeString": "struct KeepFactorySelection.Storage storage pointer"
                            }
                          },
                          "id": 6406,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "keepStakedFactory",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 6324,
                          "src": "4417:23:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        ],
                        "id": 6404,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4409:7:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 6407,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4409:32:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 6409,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4453:1:20",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "id": 6408,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4445:7:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 6410,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4445:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "src": "4409:46:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 6423,
                  "nodeType": "IfStatement",
                  "src": "4405:239:20",
                  "trueBody": {
                    "id": 6422,
                    "nodeType": "Block",
                    "src": "4457:187:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 6417,
                              "name": "_minimumBondableValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6397,
                              "src": "4536:21:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 6418,
                              "name": "_groupSize",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6399,
                              "src": "4575:10:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 6419,
                              "name": "_honestThreshold",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6401,
                              "src": "4603:16:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 6412,
                                "name": "_self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6395,
                                "src": "4471:5:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                  "typeString": "struct KeepFactorySelection.Storage storage pointer"
                                }
                              },
                              "id": 6415,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "keepStakedFactory",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 6324,
                              "src": "4471:23:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                "typeString": "contract IBondedECDSAKeepFactory"
                              }
                            },
                            "id": 6416,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "setMinimumBondableValue",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11466,
                            "src": "4471:47:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256,uint256) external"
                            }
                          },
                          "id": 6420,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4471:162:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6421,
                        "nodeType": "ExpressionStatement",
                        "src": "4471:162:20"
                      }
                    ]
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    },
                    "id": 6431,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 6425,
                            "name": "_self",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6395,
                            "src": "4665:5:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                              "typeString": "struct KeepFactorySelection.Storage storage pointer"
                            }
                          },
                          "id": 6426,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "fullyBackedFactory",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 6326,
                          "src": "4665:24:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        ],
                        "id": 6424,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4657:7:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 6427,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4657:33:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "!=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 6429,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4702:1:20",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          }
                        ],
                        "id": 6428,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "lValueRequested": false,
                        "nodeType": "ElementaryTypeNameExpression",
                        "src": "4694:7:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_address_$",
                          "typeString": "type(address)"
                        },
                        "typeName": "address"
                      },
                      "id": 6430,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "4694:10:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address_payable",
                        "typeString": "address payable"
                      }
                    },
                    "src": "4657:47:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 6443,
                  "nodeType": "IfStatement",
                  "src": "4653:241:20",
                  "trueBody": {
                    "id": 6442,
                    "nodeType": "Block",
                    "src": "4706:188:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 6437,
                              "name": "_minimumBondableValue",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6397,
                              "src": "4786:21:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 6438,
                              "name": "_groupSize",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6399,
                              "src": "4825:10:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            {
                              "argumentTypes": null,
                              "id": 6439,
                              "name": "_honestThreshold",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6401,
                              "src": "4853:16:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 6432,
                                "name": "_self",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 6395,
                                "src": "4720:5:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                  "typeString": "struct KeepFactorySelection.Storage storage pointer"
                                }
                              },
                              "id": 6435,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "fullyBackedFactory",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": 6326,
                              "src": "4720:24:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                "typeString": "contract IBondedECDSAKeepFactory"
                              }
                            },
                            "id": 6436,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "setMinimumBondableValue",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 11466,
                            "src": "4720:48:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$",
                              "typeString": "function (uint256,uint256,uint256) external"
                            }
                          },
                          "id": 6440,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "4720:163:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 6441,
                        "nodeType": "ExpressionStatement",
                        "src": "4720:163:20"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@notice Sets the minimum bondable value required from the operator to\n join the sortition pool for tBTC.\n @param _minimumBondableValue The minimum bond value the application\n requires from a single keep.\n @param _groupSize Number of signers in the keep.\n @param _honestThreshold Minimum number of honest keep signers.",
            "id": 6445,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "setMinimumBondableValue",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6402,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6395,
                  "name": "_self",
                  "nodeType": "VariableDeclaration",
                  "scope": 6445,
                  "src": "4257:21:20",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                    "typeString": "struct KeepFactorySelection.Storage"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6394,
                    "name": "Storage",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6327,
                    "src": "4257:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                      "typeString": "struct KeepFactorySelection.Storage"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6397,
                  "name": "_minimumBondableValue",
                  "nodeType": "VariableDeclaration",
                  "scope": 6445,
                  "src": "4288:29:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6396,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4288:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6399,
                  "name": "_groupSize",
                  "nodeType": "VariableDeclaration",
                  "scope": 6445,
                  "src": "4327:18:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6398,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4327:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6401,
                  "name": "_honestThreshold",
                  "nodeType": "VariableDeclaration",
                  "scope": 6445,
                  "src": "4355:24:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6400,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4355:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4247:138:20"
            },
            "returnParameters": {
              "id": 6403,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4395:0:20"
            },
            "scope": 6575,
            "src": "4215:685:20",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": {
              "id": 6526,
              "nodeType": "Block",
              "src": "5325:947:20",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 6466,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "id": 6457,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 6451,
                              "name": "_self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6447,
                              "src": "5360:5:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                "typeString": "struct KeepFactorySelection.Storage storage pointer"
                              }
                            },
                            "id": 6452,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "fullyBackedFactory",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6326,
                            "src": "5360:24:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                              "typeString": "contract IBondedECDSAKeepFactory"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                              "typeString": "contract IBondedECDSAKeepFactory"
                            }
                          ],
                          "id": 6450,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5352:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 6453,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5352:33:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 6455,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5397:1:20",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            }
                          ],
                          "id": 6454,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5389:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 6456,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5389:10:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      "src": "5352:47:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "||",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      },
                      "id": 6465,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 6459,
                              "name": "_self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6447,
                              "src": "5423:5:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                "typeString": "struct KeepFactorySelection.Storage storage pointer"
                              }
                            },
                            "id": 6460,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "factorySelector",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6322,
                            "src": "5423:21:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                              "typeString": "contract KeepFactorySelector"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                              "typeString": "contract KeepFactorySelector"
                            }
                          ],
                          "id": 6458,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5415:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 6461,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5415:30:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "hexValue": "30",
                            "id": 6463,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "5457:1:20",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            },
                            "value": "0"
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_rational_0_by_1",
                              "typeString": "int_const 0"
                            }
                          ],
                          "id": 6462,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "nodeType": "ElementaryTypeNameExpression",
                          "src": "5449:7:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_type$_t_address_$",
                            "typeString": "type(address)"
                          },
                          "typeName": "address"
                        },
                        "id": 6464,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "typeConversion",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5449:10:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_address_payable",
                          "typeString": "address payable"
                        }
                      },
                      "src": "5415:44:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "5352:107:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 6476,
                  "nodeType": "IfStatement",
                  "src": "5335:370:20",
                  "trueBody": {
                    "id": 6475,
                    "nodeType": "Block",
                    "src": "5470:235:20",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 6472,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 6467,
                              "name": "_self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6447,
                              "src": "5627:5:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                "typeString": "struct KeepFactorySelection.Storage storage pointer"
                              }
                            },
                            "id": 6469,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "selectedFactory",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6320,
                            "src": "5627:21:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                              "typeString": "contract IBondedECDSAKeepFactory"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 6470,
                              "name": "_self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6447,
                              "src": "5651:5:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                "typeString": "struct KeepFactorySelection.Storage storage pointer"
                              }
                            },
                            "id": 6471,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "keepStakedFactory",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6324,
                            "src": "5651:23:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                              "typeString": "contract IBondedECDSAKeepFactory"
                            }
                          },
                          "src": "5627:47:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        },
                        "id": 6473,
                        "nodeType": "ExpressionStatement",
                        "src": "5627:47:20"
                      },
                      {
                        "expression": null,
                        "functionReturnParameters": 6449,
                        "id": 6474,
                        "nodeType": "Return",
                        "src": "5688:7:20"
                      }
                    ]
                  }
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 6480,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "nodeType": "UnaryOperation",
                    "operator": "++",
                    "prefix": false,
                    "src": "5715:22:20",
                    "subExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6477,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6447,
                        "src": "5715:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      },
                      "id": 6479,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "requestCounter",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6318,
                      "src": "5715:20:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 6481,
                  "nodeType": "ExpressionStatement",
                  "src": "5715:22:20"
                },
                {
                  "assignments": [
                    6483
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 6483,
                      "name": "seed",
                      "nodeType": "VariableDeclaration",
                      "scope": 6526,
                      "src": "5747:12:20",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 6482,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "5747:7:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 6496,
                  "initialValue": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "arguments": [
                          {
                            "argumentTypes": null,
                            "arguments": [
                              {
                                "argumentTypes": null,
                                "arguments": [
                                  {
                                    "argumentTypes": null,
                                    "id": 6489,
                                    "name": "this",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 18474,
                                    "src": "5834:4:20",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_contract$_KeepFactorySelection_$6575",
                                      "typeString": "library KeepFactorySelection"
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_KeepFactorySelection_$6575",
                                      "typeString": "library KeepFactorySelection"
                                    }
                                  ],
                                  "id": 6488,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "5826:7:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_address_$",
                                    "typeString": "type(address)"
                                  },
                                  "typeName": "address"
                                },
                                "id": 6490,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "kind": "typeConversion",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "5826:13:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                }
                              },
                              {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 6491,
                                  "name": "_self",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 6447,
                                  "src": "5841:5:20",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                    "typeString": "struct KeepFactorySelection.Storage storage pointer"
                                  }
                                },
                                "id": 6492,
                                "isConstant": false,
                                "isLValue": true,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "requestCounter",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": 6318,
                                "src": "5841:20:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_address",
                                  "typeString": "address"
                                },
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "expression": {
                                "argumentTypes": null,
                                "id": 6486,
                                "name": "abi",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 18347,
                                "src": "5809:3:20",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_abi",
                                  "typeString": "abi"
                                }
                              },
                              "id": 6487,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "encodePacked",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "5809:16:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
                                "typeString": "function () pure returns (bytes memory)"
                              }
                            },
                            "id": 6493,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "5809:53:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          }
                        ],
                        "expression": {
                          "argumentTypes": [
                            {
                              "typeIdentifier": "t_bytes_memory_ptr",
                              "typeString": "bytes memory"
                            }
                          ],
                          "id": 6485,
                          "name": "keccak256",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 18354,
                          "src": "5799:9:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
                            "typeString": "function (bytes memory) pure returns (bytes32)"
                          }
                        },
                        "id": 6494,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "kind": "functionCall",
                        "lValueRequested": false,
                        "names": [],
                        "nodeType": "FunctionCall",
                        "src": "5799:64:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bytes32",
                          "typeString": "bytes32"
                        }
                      ],
                      "id": 6484,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "5774:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint256_$",
                        "typeString": "type(uint256)"
                      },
                      "typeName": "uint256"
                    },
                    "id": 6495,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5774:103:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "5747:130:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 6509,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6497,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6447,
                        "src": "5887:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      },
                      "id": 6499,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "selectedFactory",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6320,
                      "src": "5887:21:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 6503,
                          "name": "seed",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6483,
                          "src": "5960:4:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 6504,
                            "name": "_self",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6447,
                            "src": "5978:5:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                              "typeString": "struct KeepFactorySelection.Storage storage pointer"
                            }
                          },
                          "id": 6505,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "keepStakedFactory",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 6324,
                          "src": "5978:23:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        },
                        {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 6506,
                            "name": "_self",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6447,
                            "src": "6015:5:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                              "typeString": "struct KeepFactorySelection.Storage storage pointer"
                            }
                          },
                          "id": 6507,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "fullyBackedFactory",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 6326,
                          "src": "6015:24:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          },
                          {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          }
                        ],
                        "expression": {
                          "argumentTypes": null,
                          "expression": {
                            "argumentTypes": null,
                            "id": 6500,
                            "name": "_self",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6447,
                            "src": "5911:5:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                              "typeString": "struct KeepFactorySelection.Storage storage pointer"
                            }
                          },
                          "id": 6501,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "memberName": "factorySelector",
                          "nodeType": "MemberAccess",
                          "referencedDeclaration": 6322,
                          "src": "5911:21:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                            "typeString": "contract KeepFactorySelector"
                          }
                        },
                        "id": 6502,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "selectFactory",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": 6315,
                        "src": "5911:35:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_function_external_view$_t_uint256_$_t_contract$_IBondedECDSAKeepFactory_$11467_$_t_contract$_IBondedECDSAKeepFactory_$11467_$returns$_t_contract$_IBondedECDSAKeepFactory_$11467_$",
                          "typeString": "function (uint256,contract IBondedECDSAKeepFactory,contract IBondedECDSAKeepFactory) view external returns (contract IBondedECDSAKeepFactory)"
                        }
                      },
                      "id": 6508,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "functionCall",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "5911:138:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "src": "5887:162:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "id": 6510,
                  "nodeType": "ExpressionStatement",
                  "src": "5887:162:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6522,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          },
                          "id": 6516,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 6512,
                              "name": "_self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6447,
                              "src": "6081:5:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                "typeString": "struct KeepFactorySelection.Storage storage pointer"
                              }
                            },
                            "id": 6513,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "selectedFactory",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6320,
                            "src": "6081:21:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                              "typeString": "contract IBondedECDSAKeepFactory"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 6514,
                              "name": "_self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6447,
                              "src": "6106:5:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                "typeString": "struct KeepFactorySelection.Storage storage pointer"
                              }
                            },
                            "id": 6515,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "keepStakedFactory",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6324,
                            "src": "6106:23:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                              "typeString": "contract IBondedECDSAKeepFactory"
                            }
                          },
                          "src": "6081:48:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "||",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                            "typeString": "contract IBondedECDSAKeepFactory"
                          },
                          "id": 6521,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 6517,
                              "name": "_self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6447,
                              "src": "6149:5:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                "typeString": "struct KeepFactorySelection.Storage storage pointer"
                              }
                            },
                            "id": 6518,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "selectedFactory",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6320,
                            "src": "6149:21:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                              "typeString": "contract IBondedECDSAKeepFactory"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "==",
                          "rightExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 6519,
                              "name": "_self",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6447,
                              "src": "6174:5:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                "typeString": "struct KeepFactorySelection.Storage storage pointer"
                              }
                            },
                            "id": 6520,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "fullyBackedFactory",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 6326,
                            "src": "6174:24:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                              "typeString": "contract IBondedECDSAKeepFactory"
                            }
                          },
                          "src": "6149:49:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "6081:117:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "466163746f72792073656c6563746f722072657475726e656420756e6b6e6f776e20666163746f7279",
                        "id": 6523,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6212:43:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_8599711701b56a49c3a6c6372955e783e877430ad9ea742dc915f7abe2c2eeeb",
                          "typeString": "literal_string \"Factory selector returned unknown factory\""
                        },
                        "value": "Factory selector returned unknown factory"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_8599711701b56a49c3a6c6372955e783e877430ad9ea742dc915f7abe2c2eeeb",
                          "typeString": "literal_string \"Factory selector returned unknown factory\""
                        }
                      ],
                      "id": 6511,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "6060:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6524,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6060:205:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6525,
                  "nodeType": "ExpressionStatement",
                  "src": "6060:205:20"
                }
              ]
            },
            "documentation": "@notice Refreshes the keep factory choice. If either ETH-bond-only factory\n or selection strategy is not set, KEEP-stake factory is selected.\n Otherwise, calls selection strategy providing addresses of both\n factories to make a choice. Additionally, passes the selection seed\n evaluated from the current request counter value.",
            "id": 6527,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "refreshFactory",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6448,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6447,
                  "name": "_self",
                  "nodeType": "VariableDeclaration",
                  "scope": 6527,
                  "src": "5293:21:20",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                    "typeString": "struct KeepFactorySelection.Storage"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6446,
                    "name": "Storage",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6327,
                    "src": "5293:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                      "typeString": "struct KeepFactorySelection.Storage"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5292:23:20"
            },
            "returnParameters": {
              "id": 6449,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "5325:0:20"
            },
            "scope": 6575,
            "src": "5269:1003:20",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6573,
              "nodeType": "Block",
              "src": "7357:372:20",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_address",
                          "typeString": "address"
                        },
                        "id": 6545,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "id": 6540,
                              "name": "_keepStakedFactory",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 6531,
                              "src": "7396:18:20",
                              "typeDescriptions": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              }
                            ],
                            "id": 6539,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "7388:7:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 6541,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7388:27:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "!=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "hexValue": "30",
                              "id": 6543,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "7427:1:20",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              },
                              "value": "0"
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_rational_0_by_1",
                                "typeString": "int_const 0"
                              }
                            ],
                            "id": 6542,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "7419:7:20",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_address_$",
                              "typeString": "type(address)"
                            },
                            "typeName": "address"
                          },
                          "id": 6544,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7419:10:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address_payable",
                            "typeString": "address payable"
                          }
                        },
                        "src": "7388:41:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "496e76616c6964204b4545502d7374616b656420666163746f72792061646472657373",
                        "id": 6546,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7443:37:20",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_02fab22c78c731a4c9fe62b46e7e5c928ec59e705bde95646ae4333884ae4acb",
                          "typeString": "literal_string \"Invalid KEEP-staked factory address\""
                        },
                        "value": "Invalid KEEP-staked factory address"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_02fab22c78c731a4c9fe62b46e7e5c928ec59e705bde95646ae4333884ae4acb",
                          "typeString": "literal_string \"Invalid KEEP-staked factory address\""
                        }
                      ],
                      "id": 6538,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        18363,
                        18364
                      ],
                      "referencedDeclaration": 18364,
                      "src": "7367:7:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6547,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7367:123:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6548,
                  "nodeType": "ExpressionStatement",
                  "src": "7367:123:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 6555,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6549,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6529,
                        "src": "7501:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      },
                      "id": 6551,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "keepStakedFactory",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6324,
                      "src": "7501:23:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 6553,
                          "name": "_keepStakedFactory",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6531,
                          "src": "7551:18:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 6552,
                        "name": "IBondedECDSAKeepFactory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 11467,
                        "src": "7527:23:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_IBondedECDSAKeepFactory_$11467_$",
                          "typeString": "type(contract IBondedECDSAKeepFactory)"
                        }
                      },
                      "id": 6554,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "7527:43:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "src": "7501:69:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "id": 6556,
                  "nodeType": "ExpressionStatement",
                  "src": "7501:69:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 6563,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6557,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6529,
                        "src": "7580:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      },
                      "id": 6559,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "fullyBackedFactory",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6326,
                      "src": "7580:24:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 6561,
                          "name": "_fullyBackedFactory",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6533,
                          "src": "7631:19:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 6560,
                        "name": "IBondedECDSAKeepFactory",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 11467,
                        "src": "7607:23:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_IBondedECDSAKeepFactory_$11467_$",
                          "typeString": "type(contract IBondedECDSAKeepFactory)"
                        }
                      },
                      "id": 6562,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "7607:44:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                        "typeString": "contract IBondedECDSAKeepFactory"
                      }
                    },
                    "src": "7580:71:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                      "typeString": "contract IBondedECDSAKeepFactory"
                    }
                  },
                  "id": 6564,
                  "nodeType": "ExpressionStatement",
                  "src": "7580:71:20"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 6571,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 6565,
                        "name": "_self",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6529,
                        "src": "7661:5:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                          "typeString": "struct KeepFactorySelection.Storage storage pointer"
                        }
                      },
                      "id": 6567,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": true,
                      "memberName": "factorySelector",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 6322,
                      "src": "7661:21:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                        "typeString": "contract KeepFactorySelector"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "arguments": [
                        {
                          "argumentTypes": null,
                          "id": 6569,
                          "name": "_factorySelector",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6535,
                          "src": "7705:16:20",
                          "typeDescriptions": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        }
                      ],
                      "expression": {
                        "argumentTypes": [
                          {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          }
                        ],
                        "id": 6568,
                        "name": "KeepFactorySelector",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6316,
                        "src": "7685:19:20",
                        "typeDescriptions": {
                          "typeIdentifier": "t_type$_t_contract$_KeepFactorySelector_$6316_$",
                          "typeString": "type(contract KeepFactorySelector)"
                        }
                      },
                      "id": 6570,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "kind": "typeConversion",
                      "lValueRequested": false,
                      "names": [],
                      "nodeType": "FunctionCall",
                      "src": "7685:37:20",
                      "typeDescriptions": {
                        "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                        "typeString": "contract KeepFactorySelector"
                      }
                    },
                    "src": "7661:61:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                      "typeString": "contract KeepFactorySelector"
                    }
                  },
                  "id": 6572,
                  "nodeType": "ExpressionStatement",
                  "src": "7661:61:20"
                }
              ]
            },
            "documentation": "@notice Sets addresses of the keep factories and the selection strategy\n contracts.\n KeepFactorySelection can work without the keep factory selection\n strategy set, always selecting the default KEEP-stake-based factory.\n Once both fully-backed keep factory and factory selection strategy are\n set, KEEP-stake-based factory is no longer the default choice and it is\n up to the selection strategy to decide which factory should be chosen.\n @dev Can be called multiple times! It's responsibility of a contract\n using this library to limit and protect updates.\n @param _keepStakedFactory Address of the regular, KEEP-stake based keep\n factory.\n @param _fullyBackedFactory Address of the fully-backed, ETH-bond-only based\n keep factory.\n @param _factorySelector Address of the keep factory selection strategy.",
            "id": 6574,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "setFactories",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6536,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6529,
                  "name": "_self",
                  "nodeType": "VariableDeclaration",
                  "scope": 6574,
                  "src": "7213:21:20",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                    "typeString": "struct KeepFactorySelection.Storage"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6528,
                    "name": "Storage",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6327,
                    "src": "7213:7:20",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                      "typeString": "struct KeepFactorySelection.Storage"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6531,
                  "name": "_keepStakedFactory",
                  "nodeType": "VariableDeclaration",
                  "scope": 6574,
                  "src": "7244:26:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6530,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7244:7:20",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6533,
                  "name": "_fullyBackedFactory",
                  "nodeType": "VariableDeclaration",
                  "scope": 6574,
                  "src": "7280:27:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6532,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7280:7:20",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6535,
                  "name": "_factorySelector",
                  "nodeType": "VariableDeclaration",
                  "scope": 6574,
                  "src": "7317:24:20",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6534,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7317:7:20",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7203:144:20"
            },
            "returnParameters": {
              "id": 6537,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "7357:0:20"
            },
            "scope": 6575,
            "src": "7182:547:20",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 6576,
        "src": "1274:6457:20"
      }
    ],
    "src": "0:7732:20"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "/home/runner/work/tbtc/tbtc/solidity/contracts/system/KeepFactorySelection.sol",
      "exportedSymbols": {
        "KeepFactorySelection": [
          6575
        ],
        "KeepFactorySelector": [
          6316
        ]
      }
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "0.5",
            ".17"
          ]
        },
        "id": 6302,
        "name": "PragmaDirective",
        "src": "0:23:20"
      },
      {
        "attributes": {
          "SourceUnit": 11468,
          "absolutePath": "@keep-network/keep-ecdsa/contracts/api/IBondedECDSAKeepFactory.sol",
          "file": "@keep-network/keep-ecdsa/contracts/api/IBondedECDSAKeepFactory.sol",
          "scope": 6576,
          "symbolAliases": [
            {
              "foreign": 6303,
              "local": null
            }
          ],
          "unitAlias": ""
        },
        "id": 6304,
        "name": "ImportDirective",
        "src": "25:113:20"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "interface",
          "documentation": "@title Bonded ECDSA keep factory selection strategy.\n @notice The strategy defines the algorithm for selecting a factory. tBTC\n uses two bonded ECDSA keep factories, selecting one of them for each new\n deposit being opened.",
          "fullyImplemented": false,
          "linearizedBaseContracts": [
            6316
          ],
          "name": "KeepFactorySelector",
          "scope": 6576
        },
        "children": [
          {
            "attributes": {
              "body": null,
              "documentation": "@notice Selects keep factory for the new deposit.\n @param _seed Request seed.\n @param _keepStakedFactory Regular, KEEP-stake based keep factory.\n @param _fullyBackedFactory Fully backed, ETH-bond-only based keep factory.\n @return The selected keep factory.",
              "implemented": false,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "selectFactory",
              "scope": 6316,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_seed",
                      "scope": 6315,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 6305,
                        "name": "ElementaryTypeName",
                        "src": "738:7:20"
                      }
                    ],
                    "id": 6306,
                    "name": "VariableDeclaration",
                    "src": "738:13:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_keepStakedFactory",
                      "scope": 6315,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "contract IBondedECDSAKeepFactory",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "IBondedECDSAKeepFactory",
                          "referencedDeclaration": 11467,
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "id": 6307,
                        "name": "UserDefinedTypeName",
                        "src": "761:23:20"
                      }
                    ],
                    "id": 6308,
                    "name": "VariableDeclaration",
                    "src": "761:42:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_fullyBackedFactory",
                      "scope": 6315,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "contract IBondedECDSAKeepFactory",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "IBondedECDSAKeepFactory",
                          "referencedDeclaration": 11467,
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "id": 6309,
                        "name": "UserDefinedTypeName",
                        "src": "813:23:20"
                      }
                    ],
                    "id": 6310,
                    "name": "VariableDeclaration",
                    "src": "813:43:20"
                  }
                ],
                "id": 6311,
                "name": "ParameterList",
                "src": "728:134:20"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6315,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "contract IBondedECDSAKeepFactory",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "IBondedECDSAKeepFactory",
                          "referencedDeclaration": 11467,
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "id": 6312,
                        "name": "UserDefinedTypeName",
                        "src": "886:23:20"
                      }
                    ],
                    "id": 6313,
                    "name": "VariableDeclaration",
                    "src": "886:23:20"
                  }
                ],
                "id": 6314,
                "name": "ParameterList",
                "src": "885:25:20"
              }
            ],
            "id": 6315,
            "name": "FunctionDefinition",
            "src": "706:205:20"
          }
        ],
        "id": 6316,
        "name": "ContractDefinition",
        "src": "377:536:20"
      },
      {
        "attributes": {
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "library",
          "documentation": "@title Bonded ECDSA keep factory selection library.\n @notice tBTC uses two bonded ECDSA keep factories: one based on KEEP stake\n and ETH bond, and another based only on ETH bond. The library holds\n a reference to both factories as well as a reference to a selection strategy\n deciding which factory to choose for the new deposit being opened.",
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            6575
          ],
          "name": "KeepFactorySelection",
          "scope": 6576
        },
        "children": [
          {
            "attributes": {
              "canonicalName": "KeepFactorySelection.Storage",
              "name": "Storage",
              "scope": 6575,
              "visibility": "public"
            },
            "children": [
              {
                "attributes": {
                  "constant": false,
                  "name": "requestCounter",
                  "scope": 6327,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "uint256",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "name": "uint256",
                      "type": "uint256"
                    },
                    "id": 6317,
                    "name": "ElementaryTypeName",
                    "src": "1334:7:20"
                  }
                ],
                "id": 6318,
                "name": "VariableDeclaration",
                "src": "1334:22:20"
              },
              {
                "attributes": {
                  "constant": false,
                  "name": "selectedFactory",
                  "scope": 6327,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "contract IBondedECDSAKeepFactory",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "IBondedECDSAKeepFactory",
                      "referencedDeclaration": 11467,
                      "type": "contract IBondedECDSAKeepFactory"
                    },
                    "id": 6319,
                    "name": "UserDefinedTypeName",
                    "src": "1366:23:20"
                  }
                ],
                "id": 6320,
                "name": "VariableDeclaration",
                "src": "1366:39:20"
              },
              {
                "attributes": {
                  "constant": false,
                  "name": "factorySelector",
                  "scope": 6327,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "contract KeepFactorySelector",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "KeepFactorySelector",
                      "referencedDeclaration": 6316,
                      "type": "contract KeepFactorySelector"
                    },
                    "id": 6321,
                    "name": "UserDefinedTypeName",
                    "src": "1415:19:20"
                  }
                ],
                "id": 6322,
                "name": "VariableDeclaration",
                "src": "1415:35:20"
              },
              {
                "attributes": {
                  "constant": false,
                  "name": "keepStakedFactory",
                  "scope": 6327,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "contract IBondedECDSAKeepFactory",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "IBondedECDSAKeepFactory",
                      "referencedDeclaration": 11467,
                      "type": "contract IBondedECDSAKeepFactory"
                    },
                    "id": 6323,
                    "name": "UserDefinedTypeName",
                    "src": "1582:23:20"
                  }
                ],
                "id": 6324,
                "name": "VariableDeclaration",
                "src": "1582:41:20"
              },
              {
                "attributes": {
                  "constant": false,
                  "name": "fullyBackedFactory",
                  "scope": 6327,
                  "stateVariable": false,
                  "storageLocation": "default",
                  "type": "contract IBondedECDSAKeepFactory",
                  "value": null,
                  "visibility": "internal"
                },
                "children": [
                  {
                    "attributes": {
                      "contractScope": null,
                      "name": "IBondedECDSAKeepFactory",
                      "referencedDeclaration": 11467,
                      "type": "contract IBondedECDSAKeepFactory"
                    },
                    "id": 6325,
                    "name": "UserDefinedTypeName",
                    "src": "1692:23:20"
                  }
                ],
                "id": 6326,
                "name": "VariableDeclaration",
                "src": "1692:42:20"
              }
            ],
            "id": 6327,
            "name": "StructDefinition",
            "src": "1309:432:20"
          },
          {
            "attributes": {
              "documentation": "@notice Initializes the library with the default KEEP-stake-based\n factory. The default factory is guaranteed to be set and this function\n must be called when creating contract using this library.\n @dev This function can be called only one time.",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "initialize",
              "scope": 6575,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_self",
                      "scope": 6362,
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "type": "struct KeepFactorySelection.Storage",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "Storage",
                          "referencedDeclaration": 6327,
                          "type": "struct KeepFactorySelection.Storage"
                        },
                        "id": 6328,
                        "name": "UserDefinedTypeName",
                        "src": "2051:7:20"
                      }
                    ],
                    "id": 6329,
                    "name": "VariableDeclaration",
                    "src": "2051:21:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_defaultFactory",
                      "scope": 6362,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "contract IBondedECDSAKeepFactory",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "IBondedECDSAKeepFactory",
                          "referencedDeclaration": 11467,
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "id": 6330,
                        "name": "UserDefinedTypeName",
                        "src": "2082:23:20"
                      }
                    ],
                    "id": 6331,
                    "name": "VariableDeclaration",
                    "src": "2082:39:20"
                  }
                ],
                "id": 6332,
                "name": "ParameterList",
                "src": "2041:86:20"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 6333,
                "name": "ParameterList",
                "src": "2135:0:20"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_d3814fd4e72cfd7651525eee846049aca388165c613a1085fb56751abcdd36c0",
                                  "typeString": "literal_string \"Already initialized\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 6334,
                            "name": "Identifier",
                            "src": "2145:7:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "address",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                          "typeString": "contract IBondedECDSAKeepFactory"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(address)",
                                      "value": "address"
                                    },
                                    "id": 6335,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "2166:7:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "keepStakedFactory",
                                      "referencedDeclaration": 6324,
                                      "type": "contract IBondedECDSAKeepFactory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6329,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6336,
                                        "name": "Identifier",
                                        "src": "2174:5:20"
                                      }
                                    ],
                                    "id": 6337,
                                    "name": "MemberAccess",
                                    "src": "2174:23:20"
                                  }
                                ],
                                "id": 6338,
                                "name": "FunctionCall",
                                "src": "2166:32:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "address payable",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(address)",
                                      "value": "address"
                                    },
                                    "id": 6339,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "2202:7:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 6340,
                                    "name": "Literal",
                                    "src": "2210:1:20"
                                  }
                                ],
                                "id": 6341,
                                "name": "FunctionCall",
                                "src": "2202:10:20"
                              }
                            ],
                            "id": 6342,
                            "name": "BinaryOperation",
                            "src": "2166:46:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "416c726561647920696e697469616c697a6564",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Already initialized\"",
                              "value": "Already initialized"
                            },
                            "id": 6343,
                            "name": "Literal",
                            "src": "2226:21:20"
                          }
                        ],
                        "id": 6344,
                        "name": "FunctionCall",
                        "src": "2145:112:20"
                      }
                    ],
                    "id": 6345,
                    "name": "ExpressionStatement",
                    "src": "2145:112:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "keepStakedFactory",
                              "referencedDeclaration": 6324,
                              "type": "contract IBondedECDSAKeepFactory"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6329,
                                  "type": "struct KeepFactorySelection.Storage storage pointer",
                                  "value": "_self"
                                },
                                "id": 6346,
                                "name": "Identifier",
                                "src": "2268:5:20"
                              }
                            ],
                            "id": 6348,
                            "name": "MemberAccess",
                            "src": "2268:23:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "contract IBondedECDSAKeepFactory",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                      "typeString": "contract IBondedECDSAKeepFactory"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 11467,
                                  "type": "type(contract IBondedECDSAKeepFactory)",
                                  "value": "IBondedECDSAKeepFactory"
                                },
                                "id": 6349,
                                "name": "Identifier",
                                "src": "2294:23:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6331,
                                  "type": "contract IBondedECDSAKeepFactory",
                                  "value": "_defaultFactory"
                                },
                                "id": 6350,
                                "name": "Identifier",
                                "src": "2318:15:20"
                              }
                            ],
                            "id": 6351,
                            "name": "FunctionCall",
                            "src": "2294:40:20"
                          }
                        ],
                        "id": 6352,
                        "name": "Assignment",
                        "src": "2268:66:20"
                      }
                    ],
                    "id": 6353,
                    "name": "ExpressionStatement",
                    "src": "2268:66:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "selectedFactory",
                              "referencedDeclaration": 6320,
                              "type": "contract IBondedECDSAKeepFactory"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6329,
                                  "type": "struct KeepFactorySelection.Storage storage pointer",
                                  "value": "_self"
                                },
                                "id": 6354,
                                "name": "Identifier",
                                "src": "2344:5:20"
                              }
                            ],
                            "id": 6356,
                            "name": "MemberAccess",
                            "src": "2344:21:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "member_name": "keepStakedFactory",
                              "referencedDeclaration": 6324,
                              "type": "contract IBondedECDSAKeepFactory"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6329,
                                  "type": "struct KeepFactorySelection.Storage storage pointer",
                                  "value": "_self"
                                },
                                "id": 6357,
                                "name": "Identifier",
                                "src": "2368:5:20"
                              }
                            ],
                            "id": 6358,
                            "name": "MemberAccess",
                            "src": "2368:23:20"
                          }
                        ],
                        "id": 6359,
                        "name": "Assignment",
                        "src": "2344:47:20"
                      }
                    ],
                    "id": 6360,
                    "name": "ExpressionStatement",
                    "src": "2344:47:20"
                  }
                ],
                "id": 6361,
                "name": "Block",
                "src": "2135:263:20"
              }
            ],
            "id": 6362,
            "name": "FunctionDefinition",
            "src": "2022:376:20"
          },
          {
            "attributes": {
              "documentation": "@notice Returns the selected keep factory.\n This function guarantees that the same factory is returned for every\n call until selectFactoryAndRefresh is executed. This lets to evaluate\n open keep fee estimate on the same factory that will be used later for\n opening a new keep (fee estimate and open keep requests are two\n separate calls).\n @return Selected keep factory. The same vale will be returned for every\n call of this function until selectFactoryAndRefresh is executed.",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "selectFactory",
              "scope": 6575,
              "stateMutability": "view",
              "superFunction": null,
              "visibility": "public"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_self",
                      "scope": 6373,
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "type": "struct KeepFactorySelection.Storage",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "Storage",
                          "referencedDeclaration": 6327,
                          "type": "struct KeepFactorySelection.Storage"
                        },
                        "id": 6363,
                        "name": "UserDefinedTypeName",
                        "src": "2962:7:20"
                      }
                    ],
                    "id": 6364,
                    "name": "VariableDeclaration",
                    "src": "2962:21:20"
                  }
                ],
                "id": 6365,
                "name": "ParameterList",
                "src": "2961:23:20"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6373,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "contract IBondedECDSAKeepFactory",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "IBondedECDSAKeepFactory",
                          "referencedDeclaration": 11467,
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "id": 6366,
                        "name": "UserDefinedTypeName",
                        "src": "3030:23:20"
                      }
                    ],
                    "id": 6367,
                    "name": "VariableDeclaration",
                    "src": "3030:23:20"
                  }
                ],
                "id": 6368,
                "name": "ParameterList",
                "src": "3029:25:20"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "functionReturnParameters": 6368
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "member_name": "selectedFactory",
                          "referencedDeclaration": 6320,
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6364,
                              "type": "struct KeepFactorySelection.Storage storage pointer",
                              "value": "_self"
                            },
                            "id": 6369,
                            "name": "Identifier",
                            "src": "3076:5:20"
                          }
                        ],
                        "id": 6370,
                        "name": "MemberAccess",
                        "src": "3076:21:20"
                      }
                    ],
                    "id": 6371,
                    "name": "Return",
                    "src": "3069:28:20"
                  }
                ],
                "id": 6372,
                "name": "Block",
                "src": "3059:45:20"
              }
            ],
            "id": 6373,
            "name": "FunctionDefinition",
            "src": "2939:165:20"
          },
          {
            "attributes": {
              "documentation": "@notice Returns the selected keep factory and refreshes the choice\n for the next select call. The value returned by this function has been\n evaluated during the previous call. This lets to return the same value\n from selectFactory and selectFactoryAndRefresh, thus, allowing to use\n the same factory for which open keep fee estimate was evaluated (fee\n estimate and open keep requests are two separate calls).\n @return Selected keep factory.",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "selectFactoryAndRefresh",
              "scope": 6575,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_self",
                      "scope": 6393,
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "type": "struct KeepFactorySelection.Storage",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "Storage",
                          "referencedDeclaration": 6327,
                          "type": "struct KeepFactorySelection.Storage"
                        },
                        "id": 6374,
                        "name": "UserDefinedTypeName",
                        "src": "3635:7:20"
                      }
                    ],
                    "id": 6375,
                    "name": "VariableDeclaration",
                    "src": "3635:21:20"
                  }
                ],
                "id": 6376,
                "name": "ParameterList",
                "src": "3634:23:20"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "",
                      "scope": 6393,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "contract IBondedECDSAKeepFactory",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "IBondedECDSAKeepFactory",
                          "referencedDeclaration": 11467,
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "id": 6377,
                        "name": "UserDefinedTypeName",
                        "src": "3692:23:20"
                      }
                    ],
                    "id": 6378,
                    "name": "VariableDeclaration",
                    "src": "3692:23:20"
                  }
                ],
                "id": 6379,
                "name": "ParameterList",
                "src": "3691:25:20"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "assignments": [
                        6381
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "factory",
                          "scope": 6392,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "contract IBondedECDSAKeepFactory",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "contractScope": null,
                              "name": "IBondedECDSAKeepFactory",
                              "referencedDeclaration": 11467,
                              "type": "contract IBondedECDSAKeepFactory"
                            },
                            "id": 6380,
                            "name": "UserDefinedTypeName",
                            "src": "3731:23:20"
                          }
                        ],
                        "id": 6381,
                        "name": "VariableDeclaration",
                        "src": "3731:31:20"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "contract IBondedECDSAKeepFactory",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                  "typeString": "struct KeepFactorySelection.Storage storage pointer"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6373,
                              "type": "function (struct KeepFactorySelection.Storage storage pointer) view returns (contract IBondedECDSAKeepFactory)",
                              "value": "selectFactory"
                            },
                            "id": 6382,
                            "name": "Identifier",
                            "src": "3765:13:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6375,
                              "type": "struct KeepFactorySelection.Storage storage pointer",
                              "value": "_self"
                            },
                            "id": 6383,
                            "name": "Identifier",
                            "src": "3779:5:20"
                          }
                        ],
                        "id": 6384,
                        "name": "FunctionCall",
                        "src": "3765:20:20"
                      }
                    ],
                    "id": 6385,
                    "name": "VariableDeclarationStatement",
                    "src": "3731:54:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_struct$_Storage_$6327_storage_ptr",
                                  "typeString": "struct KeepFactorySelection.Storage storage pointer"
                                }
                              ],
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6527,
                              "type": "function (struct KeepFactorySelection.Storage storage pointer)",
                              "value": "refreshFactory"
                            },
                            "id": 6386,
                            "name": "Identifier",
                            "src": "3795:14:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 6375,
                              "type": "struct KeepFactorySelection.Storage storage pointer",
                              "value": "_self"
                            },
                            "id": 6387,
                            "name": "Identifier",
                            "src": "3810:5:20"
                          }
                        ],
                        "id": 6388,
                        "name": "FunctionCall",
                        "src": "3795:21:20"
                      }
                    ],
                    "id": 6389,
                    "name": "ExpressionStatement",
                    "src": "3795:21:20"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 6379
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "overloadedDeclarations": [
                            null
                          ],
                          "referencedDeclaration": 6381,
                          "type": "contract IBondedECDSAKeepFactory",
                          "value": "factory"
                        },
                        "id": 6390,
                        "name": "Identifier",
                        "src": "3834:7:20"
                      }
                    ],
                    "id": 6391,
                    "name": "Return",
                    "src": "3827:14:20"
                  }
                ],
                "id": 6392,
                "name": "Block",
                "src": "3721:127:20"
              }
            ],
            "id": 6393,
            "name": "FunctionDefinition",
            "src": "3602:246:20"
          },
          {
            "attributes": {
              "documentation": "@notice Sets the minimum bondable value required from the operator to\n join the sortition pool for tBTC.\n @param _minimumBondableValue The minimum bond value the application\n requires from a single keep.\n @param _groupSize Number of signers in the keep.\n @param _honestThreshold Minimum number of honest keep signers.",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "setMinimumBondableValue",
              "scope": 6575,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "external"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_self",
                      "scope": 6445,
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "type": "struct KeepFactorySelection.Storage",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "Storage",
                          "referencedDeclaration": 6327,
                          "type": "struct KeepFactorySelection.Storage"
                        },
                        "id": 6394,
                        "name": "UserDefinedTypeName",
                        "src": "4257:7:20"
                      }
                    ],
                    "id": 6395,
                    "name": "VariableDeclaration",
                    "src": "4257:21:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_minimumBondableValue",
                      "scope": 6445,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 6396,
                        "name": "ElementaryTypeName",
                        "src": "4288:7:20"
                      }
                    ],
                    "id": 6397,
                    "name": "VariableDeclaration",
                    "src": "4288:29:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_groupSize",
                      "scope": 6445,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 6398,
                        "name": "ElementaryTypeName",
                        "src": "4327:7:20"
                      }
                    ],
                    "id": 6399,
                    "name": "VariableDeclaration",
                    "src": "4327:18:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_honestThreshold",
                      "scope": 6445,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 6400,
                        "name": "ElementaryTypeName",
                        "src": "4355:7:20"
                      }
                    ],
                    "id": 6401,
                    "name": "VariableDeclaration",
                    "src": "4355:24:20"
                  }
                ],
                "id": 6402,
                "name": "ParameterList",
                "src": "4247:138:20"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 6403,
                "name": "ParameterList",
                "src": "4395:0:20"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "!=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "address",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                      "typeString": "contract IBondedECDSAKeepFactory"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(address)",
                                  "value": "address"
                                },
                                "id": 6404,
                                "name": "ElementaryTypeNameExpression",
                                "src": "4409:7:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "keepStakedFactory",
                                  "referencedDeclaration": 6324,
                                  "type": "contract IBondedECDSAKeepFactory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6395,
                                      "type": "struct KeepFactorySelection.Storage storage pointer",
                                      "value": "_self"
                                    },
                                    "id": 6405,
                                    "name": "Identifier",
                                    "src": "4417:5:20"
                                  }
                                ],
                                "id": 6406,
                                "name": "MemberAccess",
                                "src": "4417:23:20"
                              }
                            ],
                            "id": 6407,
                            "name": "FunctionCall",
                            "src": "4409:32:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "address payable",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(address)",
                                  "value": "address"
                                },
                                "id": 6408,
                                "name": "ElementaryTypeNameExpression",
                                "src": "4445:7:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 6409,
                                "name": "Literal",
                                "src": "4453:1:20"
                              }
                            ],
                            "id": 6410,
                            "name": "FunctionCall",
                            "src": "4445:10:20"
                          }
                        ],
                        "id": 6411,
                        "name": "BinaryOperation",
                        "src": "4409:46:20"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "setMinimumBondableValue",
                                      "referencedDeclaration": 11466,
                                      "type": "function (uint256,uint256,uint256) external"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "keepStakedFactory",
                                          "referencedDeclaration": 6324,
                                          "type": "contract IBondedECDSAKeepFactory"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 6395,
                                              "type": "struct KeepFactorySelection.Storage storage pointer",
                                              "value": "_self"
                                            },
                                            "id": 6412,
                                            "name": "Identifier",
                                            "src": "4471:5:20"
                                          }
                                        ],
                                        "id": 6415,
                                        "name": "MemberAccess",
                                        "src": "4471:23:20"
                                      }
                                    ],
                                    "id": 6416,
                                    "name": "MemberAccess",
                                    "src": "4471:47:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6397,
                                      "type": "uint256",
                                      "value": "_minimumBondableValue"
                                    },
                                    "id": 6417,
                                    "name": "Identifier",
                                    "src": "4536:21:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6399,
                                      "type": "uint256",
                                      "value": "_groupSize"
                                    },
                                    "id": 6418,
                                    "name": "Identifier",
                                    "src": "4575:10:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6401,
                                      "type": "uint256",
                                      "value": "_honestThreshold"
                                    },
                                    "id": 6419,
                                    "name": "Identifier",
                                    "src": "4603:16:20"
                                  }
                                ],
                                "id": 6420,
                                "name": "FunctionCall",
                                "src": "4471:162:20"
                              }
                            ],
                            "id": 6421,
                            "name": "ExpressionStatement",
                            "src": "4471:162:20"
                          }
                        ],
                        "id": 6422,
                        "name": "Block",
                        "src": "4457:187:20"
                      }
                    ],
                    "id": 6423,
                    "name": "IfStatement",
                    "src": "4405:239:20"
                  },
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_address",
                            "typeString": "address"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "!=",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "address",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                      "typeString": "contract IBondedECDSAKeepFactory"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(address)",
                                  "value": "address"
                                },
                                "id": 6424,
                                "name": "ElementaryTypeNameExpression",
                                "src": "4657:7:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "fullyBackedFactory",
                                  "referencedDeclaration": 6326,
                                  "type": "contract IBondedECDSAKeepFactory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6395,
                                      "type": "struct KeepFactorySelection.Storage storage pointer",
                                      "value": "_self"
                                    },
                                    "id": 6425,
                                    "name": "Identifier",
                                    "src": "4665:5:20"
                                  }
                                ],
                                "id": 6426,
                                "name": "MemberAccess",
                                "src": "4665:24:20"
                              }
                            ],
                            "id": 6427,
                            "name": "FunctionCall",
                            "src": "4657:33:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "address payable",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_rational_0_by_1",
                                      "typeString": "int_const 0"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "type": "type(address)",
                                  "value": "address"
                                },
                                "id": 6428,
                                "name": "ElementaryTypeNameExpression",
                                "src": "4694:7:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "hexvalue": "30",
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "subdenomination": null,
                                  "token": "number",
                                  "type": "int_const 0",
                                  "value": "0"
                                },
                                "id": 6429,
                                "name": "Literal",
                                "src": "4702:1:20"
                              }
                            ],
                            "id": 6430,
                            "name": "FunctionCall",
                            "src": "4694:10:20"
                          }
                        ],
                        "id": 6431,
                        "name": "BinaryOperation",
                        "src": "4657:47:20"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "tuple()",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "setMinimumBondableValue",
                                      "referencedDeclaration": 11466,
                                      "type": "function (uint256,uint256,uint256) external"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "isConstant": false,
                                          "isLValue": true,
                                          "isPure": false,
                                          "lValueRequested": false,
                                          "member_name": "fullyBackedFactory",
                                          "referencedDeclaration": 6326,
                                          "type": "contract IBondedECDSAKeepFactory"
                                        },
                                        "children": [
                                          {
                                            "attributes": {
                                              "argumentTypes": null,
                                              "overloadedDeclarations": [
                                                null
                                              ],
                                              "referencedDeclaration": 6395,
                                              "type": "struct KeepFactorySelection.Storage storage pointer",
                                              "value": "_self"
                                            },
                                            "id": 6432,
                                            "name": "Identifier",
                                            "src": "4720:5:20"
                                          }
                                        ],
                                        "id": 6435,
                                        "name": "MemberAccess",
                                        "src": "4720:24:20"
                                      }
                                    ],
                                    "id": 6436,
                                    "name": "MemberAccess",
                                    "src": "4720:48:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6397,
                                      "type": "uint256",
                                      "value": "_minimumBondableValue"
                                    },
                                    "id": 6437,
                                    "name": "Identifier",
                                    "src": "4786:21:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6399,
                                      "type": "uint256",
                                      "value": "_groupSize"
                                    },
                                    "id": 6438,
                                    "name": "Identifier",
                                    "src": "4825:10:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6401,
                                      "type": "uint256",
                                      "value": "_honestThreshold"
                                    },
                                    "id": 6439,
                                    "name": "Identifier",
                                    "src": "4853:16:20"
                                  }
                                ],
                                "id": 6440,
                                "name": "FunctionCall",
                                "src": "4720:163:20"
                              }
                            ],
                            "id": 6441,
                            "name": "ExpressionStatement",
                            "src": "4720:163:20"
                          }
                        ],
                        "id": 6442,
                        "name": "Block",
                        "src": "4706:188:20"
                      }
                    ],
                    "id": 6443,
                    "name": "IfStatement",
                    "src": "4653:241:20"
                  }
                ],
                "id": 6444,
                "name": "Block",
                "src": "4395:505:20"
              }
            ],
            "id": 6445,
            "name": "FunctionDefinition",
            "src": "4215:685:20"
          },
          {
            "attributes": {
              "documentation": "@notice Refreshes the keep factory choice. If either ETH-bond-only factory\n or selection strategy is not set, KEEP-stake factory is selected.\n Otherwise, calls selection strategy providing addresses of both\n factories to make a choice. Additionally, passes the selection seed\n evaluated from the current request counter value.",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "refreshFactory",
              "scope": 6575,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_self",
                      "scope": 6527,
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "type": "struct KeepFactorySelection.Storage",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "Storage",
                          "referencedDeclaration": 6327,
                          "type": "struct KeepFactorySelection.Storage"
                        },
                        "id": 6446,
                        "name": "UserDefinedTypeName",
                        "src": "5293:7:20"
                      }
                    ],
                    "id": 6447,
                    "name": "VariableDeclaration",
                    "src": "5293:21:20"
                  }
                ],
                "id": 6448,
                "name": "ParameterList",
                "src": "5292:23:20"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 6449,
                "name": "ParameterList",
                "src": "5325:0:20"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "falseBody": null
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          },
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "||",
                          "type": "bool"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "address",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                          "typeString": "contract IBondedECDSAKeepFactory"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(address)",
                                      "value": "address"
                                    },
                                    "id": 6450,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "5352:7:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "fullyBackedFactory",
                                      "referencedDeclaration": 6326,
                                      "type": "contract IBondedECDSAKeepFactory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6451,
                                        "name": "Identifier",
                                        "src": "5360:5:20"
                                      }
                                    ],
                                    "id": 6452,
                                    "name": "MemberAccess",
                                    "src": "5360:24:20"
                                  }
                                ],
                                "id": 6453,
                                "name": "FunctionCall",
                                "src": "5352:33:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "address payable",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(address)",
                                      "value": "address"
                                    },
                                    "id": 6454,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "5389:7:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 6455,
                                    "name": "Literal",
                                    "src": "5397:1:20"
                                  }
                                ],
                                "id": 6456,
                                "name": "FunctionCall",
                                "src": "5389:10:20"
                              }
                            ],
                            "id": 6457,
                            "name": "BinaryOperation",
                            "src": "5352:47:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "==",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "address",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_contract$_KeepFactorySelector_$6316",
                                          "typeString": "contract KeepFactorySelector"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(address)",
                                      "value": "address"
                                    },
                                    "id": 6458,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "5415:7:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "factorySelector",
                                      "referencedDeclaration": 6322,
                                      "type": "contract KeepFactorySelector"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6459,
                                        "name": "Identifier",
                                        "src": "5423:5:20"
                                      }
                                    ],
                                    "id": 6460,
                                    "name": "MemberAccess",
                                    "src": "5423:21:20"
                                  }
                                ],
                                "id": 6461,
                                "name": "FunctionCall",
                                "src": "5415:30:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "address payable",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(address)",
                                      "value": "address"
                                    },
                                    "id": 6462,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "5449:7:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 6463,
                                    "name": "Literal",
                                    "src": "5457:1:20"
                                  }
                                ],
                                "id": 6464,
                                "name": "FunctionCall",
                                "src": "5449:10:20"
                              }
                            ],
                            "id": 6465,
                            "name": "BinaryOperation",
                            "src": "5415:44:20"
                          }
                        ],
                        "id": 6466,
                        "name": "BinaryOperation",
                        "src": "5352:107:20"
                      },
                      {
                        "children": [
                          {
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "=",
                                  "type": "contract IBondedECDSAKeepFactory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": true,
                                      "member_name": "selectedFactory",
                                      "referencedDeclaration": 6320,
                                      "type": "contract IBondedECDSAKeepFactory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6467,
                                        "name": "Identifier",
                                        "src": "5627:5:20"
                                      }
                                    ],
                                    "id": 6469,
                                    "name": "MemberAccess",
                                    "src": "5627:21:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "keepStakedFactory",
                                      "referencedDeclaration": 6324,
                                      "type": "contract IBondedECDSAKeepFactory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6470,
                                        "name": "Identifier",
                                        "src": "5651:5:20"
                                      }
                                    ],
                                    "id": 6471,
                                    "name": "MemberAccess",
                                    "src": "5651:23:20"
                                  }
                                ],
                                "id": 6472,
                                "name": "Assignment",
                                "src": "5627:47:20"
                              }
                            ],
                            "id": 6473,
                            "name": "ExpressionStatement",
                            "src": "5627:47:20"
                          },
                          {
                            "attributes": {
                              "expression": null,
                              "functionReturnParameters": 6449
                            },
                            "id": 6474,
                            "name": "Return",
                            "src": "5688:7:20"
                          }
                        ],
                        "id": 6475,
                        "name": "Block",
                        "src": "5470:235:20"
                      }
                    ],
                    "id": 6476,
                    "name": "IfStatement",
                    "src": "5335:370:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "++",
                          "prefix": false,
                          "type": "uint256"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "requestCounter",
                              "referencedDeclaration": 6318,
                              "type": "uint256"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6447,
                                  "type": "struct KeepFactorySelection.Storage storage pointer",
                                  "value": "_self"
                                },
                                "id": 6477,
                                "name": "Identifier",
                                "src": "5715:5:20"
                              }
                            ],
                            "id": 6479,
                            "name": "MemberAccess",
                            "src": "5715:20:20"
                          }
                        ],
                        "id": 6480,
                        "name": "UnaryOperation",
                        "src": "5715:22:20"
                      }
                    ],
                    "id": 6481,
                    "name": "ExpressionStatement",
                    "src": "5715:22:20"
                  },
                  {
                    "attributes": {
                      "assignments": [
                        6483
                      ]
                    },
                    "children": [
                      {
                        "attributes": {
                          "constant": false,
                          "name": "seed",
                          "scope": 6526,
                          "stateVariable": false,
                          "storageLocation": "default",
                          "type": "uint256",
                          "value": null,
                          "visibility": "internal"
                        },
                        "children": [
                          {
                            "attributes": {
                              "name": "uint256",
                              "type": "uint256"
                            },
                            "id": 6482,
                            "name": "ElementaryTypeName",
                            "src": "5747:7:20"
                          }
                        ],
                        "id": 6483,
                        "name": "VariableDeclaration",
                        "src": "5747:12:20"
                      },
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "uint256",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bytes32",
                                  "typeString": "bytes32"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "type": "type(uint256)",
                              "value": "uint256"
                            },
                            "id": 6484,
                            "name": "ElementaryTypeNameExpression",
                            "src": "5774:7:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "bytes32",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_bytes_memory_ptr",
                                      "typeString": "bytes memory"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 18354,
                                  "type": "function (bytes memory) pure returns (bytes32)",
                                  "value": "keccak256"
                                },
                                "id": 6485,
                                "name": "Identifier",
                                "src": "5799:9:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "bytes memory",
                                  "type_conversion": false
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_address",
                                          "typeString": "address"
                                        },
                                        {
                                          "typeIdentifier": "t_uint256",
                                          "typeString": "uint256"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "member_name": "encodePacked",
                                      "referencedDeclaration": null,
                                      "type": "function () pure returns (bytes memory)"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 18347,
                                          "type": "abi",
                                          "value": "abi"
                                        },
                                        "id": 6486,
                                        "name": "Identifier",
                                        "src": "5809:3:20"
                                      }
                                    ],
                                    "id": 6487,
                                    "name": "MemberAccess",
                                    "src": "5809:16:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "isStructConstructorCall": false,
                                      "lValueRequested": false,
                                      "names": [
                                        null
                                      ],
                                      "type": "address",
                                      "type_conversion": true
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": [
                                            {
                                              "typeIdentifier": "t_contract$_KeepFactorySelection_$6575",
                                              "typeString": "library KeepFactorySelection"
                                            }
                                          ],
                                          "isConstant": false,
                                          "isLValue": false,
                                          "isPure": true,
                                          "lValueRequested": false,
                                          "type": "type(address)",
                                          "value": "address"
                                        },
                                        "id": 6488,
                                        "name": "ElementaryTypeNameExpression",
                                        "src": "5826:7:20"
                                      },
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 18474,
                                          "type": "library KeepFactorySelection",
                                          "value": "this"
                                        },
                                        "id": 6489,
                                        "name": "Identifier",
                                        "src": "5834:4:20"
                                      }
                                    ],
                                    "id": 6490,
                                    "name": "FunctionCall",
                                    "src": "5826:13:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "requestCounter",
                                      "referencedDeclaration": 6318,
                                      "type": "uint256"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6491,
                                        "name": "Identifier",
                                        "src": "5841:5:20"
                                      }
                                    ],
                                    "id": 6492,
                                    "name": "MemberAccess",
                                    "src": "5841:20:20"
                                  }
                                ],
                                "id": 6493,
                                "name": "FunctionCall",
                                "src": "5809:53:20"
                              }
                            ],
                            "id": 6494,
                            "name": "FunctionCall",
                            "src": "5799:64:20"
                          }
                        ],
                        "id": 6495,
                        "name": "FunctionCall",
                        "src": "5774:103:20"
                      }
                    ],
                    "id": 6496,
                    "name": "VariableDeclarationStatement",
                    "src": "5747:130:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "selectedFactory",
                              "referencedDeclaration": 6320,
                              "type": "contract IBondedECDSAKeepFactory"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6447,
                                  "type": "struct KeepFactorySelection.Storage storage pointer",
                                  "value": "_self"
                                },
                                "id": 6497,
                                "name": "Identifier",
                                "src": "5887:5:20"
                              }
                            ],
                            "id": 6499,
                            "name": "MemberAccess",
                            "src": "5887:21:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "contract IBondedECDSAKeepFactory",
                              "type_conversion": false
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                      "typeString": "contract IBondedECDSAKeepFactory"
                                    },
                                    {
                                      "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                      "typeString": "contract IBondedECDSAKeepFactory"
                                    }
                                  ],
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "selectFactory",
                                  "referencedDeclaration": 6315,
                                  "type": "function (uint256,contract IBondedECDSAKeepFactory,contract IBondedECDSAKeepFactory) view external returns (contract IBondedECDSAKeepFactory)"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "factorySelector",
                                      "referencedDeclaration": 6322,
                                      "type": "contract KeepFactorySelector"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6500,
                                        "name": "Identifier",
                                        "src": "5911:5:20"
                                      }
                                    ],
                                    "id": 6501,
                                    "name": "MemberAccess",
                                    "src": "5911:21:20"
                                  }
                                ],
                                "id": 6502,
                                "name": "MemberAccess",
                                "src": "5911:35:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6483,
                                  "type": "uint256",
                                  "value": "seed"
                                },
                                "id": 6503,
                                "name": "Identifier",
                                "src": "5960:4:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "keepStakedFactory",
                                  "referencedDeclaration": 6324,
                                  "type": "contract IBondedECDSAKeepFactory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6447,
                                      "type": "struct KeepFactorySelection.Storage storage pointer",
                                      "value": "_self"
                                    },
                                    "id": 6504,
                                    "name": "Identifier",
                                    "src": "5978:5:20"
                                  }
                                ],
                                "id": 6505,
                                "name": "MemberAccess",
                                "src": "5978:23:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": true,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "member_name": "fullyBackedFactory",
                                  "referencedDeclaration": 6326,
                                  "type": "contract IBondedECDSAKeepFactory"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6447,
                                      "type": "struct KeepFactorySelection.Storage storage pointer",
                                      "value": "_self"
                                    },
                                    "id": 6506,
                                    "name": "Identifier",
                                    "src": "6015:5:20"
                                  }
                                ],
                                "id": 6507,
                                "name": "MemberAccess",
                                "src": "6015:24:20"
                              }
                            ],
                            "id": 6508,
                            "name": "FunctionCall",
                            "src": "5911:138:20"
                          }
                        ],
                        "id": 6509,
                        "name": "Assignment",
                        "src": "5887:162:20"
                      }
                    ],
                    "id": 6510,
                    "name": "ExpressionStatement",
                    "src": "5887:162:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_8599711701b56a49c3a6c6372955e783e877430ad9ea742dc915f7abe2c2eeeb",
                                  "typeString": "literal_string \"Factory selector returned unknown factory\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 6511,
                            "name": "Identifier",
                            "src": "6060:7:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_bool",
                                "typeString": "bool"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "||",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                    "typeString": "contract IBondedECDSAKeepFactory"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "==",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "selectedFactory",
                                      "referencedDeclaration": 6320,
                                      "type": "contract IBondedECDSAKeepFactory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6512,
                                        "name": "Identifier",
                                        "src": "6081:5:20"
                                      }
                                    ],
                                    "id": 6513,
                                    "name": "MemberAccess",
                                    "src": "6081:21:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "keepStakedFactory",
                                      "referencedDeclaration": 6324,
                                      "type": "contract IBondedECDSAKeepFactory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6514,
                                        "name": "Identifier",
                                        "src": "6106:5:20"
                                      }
                                    ],
                                    "id": 6515,
                                    "name": "MemberAccess",
                                    "src": "6106:23:20"
                                  }
                                ],
                                "id": 6516,
                                "name": "BinaryOperation",
                                "src": "6081:48:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_contract$_IBondedECDSAKeepFactory_$11467",
                                    "typeString": "contract IBondedECDSAKeepFactory"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "operator": "==",
                                  "type": "bool"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "selectedFactory",
                                      "referencedDeclaration": 6320,
                                      "type": "contract IBondedECDSAKeepFactory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6517,
                                        "name": "Identifier",
                                        "src": "6149:5:20"
                                      }
                                    ],
                                    "id": 6518,
                                    "name": "MemberAccess",
                                    "src": "6149:21:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "isConstant": false,
                                      "isLValue": true,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "member_name": "fullyBackedFactory",
                                      "referencedDeclaration": 6326,
                                      "type": "contract IBondedECDSAKeepFactory"
                                    },
                                    "children": [
                                      {
                                        "attributes": {
                                          "argumentTypes": null,
                                          "overloadedDeclarations": [
                                            null
                                          ],
                                          "referencedDeclaration": 6447,
                                          "type": "struct KeepFactorySelection.Storage storage pointer",
                                          "value": "_self"
                                        },
                                        "id": 6519,
                                        "name": "Identifier",
                                        "src": "6174:5:20"
                                      }
                                    ],
                                    "id": 6520,
                                    "name": "MemberAccess",
                                    "src": "6174:24:20"
                                  }
                                ],
                                "id": 6521,
                                "name": "BinaryOperation",
                                "src": "6149:49:20"
                              }
                            ],
                            "id": 6522,
                            "name": "BinaryOperation",
                            "src": "6081:117:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "466163746f72792073656c6563746f722072657475726e656420756e6b6e6f776e20666163746f7279",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Factory selector returned unknown factory\"",
                              "value": "Factory selector returned unknown factory"
                            },
                            "id": 6523,
                            "name": "Literal",
                            "src": "6212:43:20"
                          }
                        ],
                        "id": 6524,
                        "name": "FunctionCall",
                        "src": "6060:205:20"
                      }
                    ],
                    "id": 6525,
                    "name": "ExpressionStatement",
                    "src": "6060:205:20"
                  }
                ],
                "id": 6526,
                "name": "Block",
                "src": "5325:947:20"
              }
            ],
            "id": 6527,
            "name": "FunctionDefinition",
            "src": "5269:1003:20"
          },
          {
            "attributes": {
              "documentation": "@notice Sets addresses of the keep factories and the selection strategy\n contracts.\n KeepFactorySelection can work without the keep factory selection\n strategy set, always selecting the default KEEP-stake-based factory.\n Once both fully-backed keep factory and factory selection strategy are\n set, KEEP-stake-based factory is no longer the default choice and it is\n up to the selection strategy to decide which factory should be chosen.\n @dev Can be called multiple times! It's responsibility of a contract\n using this library to limit and protect updates.\n @param _keepStakedFactory Address of the regular, KEEP-stake based keep\n factory.\n @param _fullyBackedFactory Address of the fully-backed, ETH-bond-only based\n keep factory.\n @param _factorySelector Address of the keep factory selection strategy.",
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "setFactories",
              "scope": 6575,
              "stateMutability": "nonpayable",
              "superFunction": null,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_self",
                      "scope": 6574,
                      "stateVariable": false,
                      "storageLocation": "storage",
                      "type": "struct KeepFactorySelection.Storage",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "contractScope": null,
                          "name": "Storage",
                          "referencedDeclaration": 6327,
                          "type": "struct KeepFactorySelection.Storage"
                        },
                        "id": 6528,
                        "name": "UserDefinedTypeName",
                        "src": "7213:7:20"
                      }
                    ],
                    "id": 6529,
                    "name": "VariableDeclaration",
                    "src": "7213:21:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_keepStakedFactory",
                      "scope": 6574,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6530,
                        "name": "ElementaryTypeName",
                        "src": "7244:7:20"
                      }
                    ],
                    "id": 6531,
                    "name": "VariableDeclaration",
                    "src": "7244:26:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_fullyBackedFactory",
                      "scope": 6574,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6532,
                        "name": "ElementaryTypeName",
                        "src": "7280:7:20"
                      }
                    ],
                    "id": 6533,
                    "name": "VariableDeclaration",
                    "src": "7280:27:20"
                  },
                  {
                    "attributes": {
                      "constant": false,
                      "name": "_factorySelector",
                      "scope": 6574,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "address",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "address",
                          "stateMutability": "nonpayable",
                          "type": "address"
                        },
                        "id": 6534,
                        "name": "ElementaryTypeName",
                        "src": "7317:7:20"
                      }
                    ],
                    "id": 6535,
                    "name": "VariableDeclaration",
                    "src": "7317:24:20"
                  }
                ],
                "id": 6536,
                "name": "ParameterList",
                "src": "7203:144:20"
              },
              {
                "attributes": {
                  "parameters": [
                    null
                  ]
                },
                "children": [],
                "id": 6537,
                "name": "ParameterList",
                "src": "7357:0:20"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_02fab22c78c731a4c9fe62b46e7e5c928ec59e705bde95646ae4333884ae4acb",
                                  "typeString": "literal_string \"Invalid KEEP-staked factory address\""
                                }
                              ],
                              "overloadedDeclarations": [
                                18363,
                                18364
                              ],
                              "referencedDeclaration": 18364,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 6538,
                            "name": "Identifier",
                            "src": "7367:7:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_address",
                                "typeString": "address"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "!=",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "address",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_address",
                                          "typeString": "address"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(address)",
                                      "value": "address"
                                    },
                                    "id": 6539,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "7388:7:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "overloadedDeclarations": [
                                        null
                                      ],
                                      "referencedDeclaration": 6531,
                                      "type": "address",
                                      "value": "_keepStakedFactory"
                                    },
                                    "id": 6540,
                                    "name": "Identifier",
                                    "src": "7396:18:20"
                                  }
                                ],
                                "id": 6541,
                                "name": "FunctionCall",
                                "src": "7388:27:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "isStructConstructorCall": false,
                                  "lValueRequested": false,
                                  "names": [
                                    null
                                  ],
                                  "type": "address payable",
                                  "type_conversion": true
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": [
                                        {
                                          "typeIdentifier": "t_rational_0_by_1",
                                          "typeString": "int_const 0"
                                        }
                                      ],
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "type": "type(address)",
                                      "value": "address"
                                    },
                                    "id": 6542,
                                    "name": "ElementaryTypeNameExpression",
                                    "src": "7419:7:20"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "30",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 0",
                                      "value": "0"
                                    },
                                    "id": 6543,
                                    "name": "Literal",
                                    "src": "7427:1:20"
                                  }
                                ],
                                "id": 6544,
                                "name": "FunctionCall",
                                "src": "7419:10:20"
                              }
                            ],
                            "id": 6545,
                            "name": "BinaryOperation",
                            "src": "7388:41:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "496e76616c6964204b4545502d7374616b656420666163746f72792061646472657373",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"Invalid KEEP-staked factory address\"",
                              "value": "Invalid KEEP-staked factory address"
                            },
                            "id": 6546,
                            "name": "Literal",
                            "src": "7443:37:20"
                          }
                        ],
                        "id": 6547,
                        "name": "FunctionCall",
                        "src": "7367:123:20"
                      }
                    ],
                    "id": 6548,
                    "name": "ExpressionStatement",
                    "src": "7367:123:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "keepStakedFactory",
                              "referencedDeclaration": 6324,
                              "type": "contract IBondedECDSAKeepFactory"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6529,
                                  "type": "struct KeepFactorySelection.Storage storage pointer",
                                  "value": "_self"
                                },
                                "id": 6549,
                                "name": "Identifier",
                                "src": "7501:5:20"
                              }
                            ],
                            "id": 6551,
                            "name": "MemberAccess",
                            "src": "7501:23:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "contract IBondedECDSAKeepFactory",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 11467,
                                  "type": "type(contract IBondedECDSAKeepFactory)",
                                  "value": "IBondedECDSAKeepFactory"
                                },
                                "id": 6552,
                                "name": "Identifier",
                                "src": "7527:23:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6531,
                                  "type": "address",
                                  "value": "_keepStakedFactory"
                                },
                                "id": 6553,
                                "name": "Identifier",
                                "src": "7551:18:20"
                              }
                            ],
                            "id": 6554,
                            "name": "FunctionCall",
                            "src": "7527:43:20"
                          }
                        ],
                        "id": 6555,
                        "name": "Assignment",
                        "src": "7501:69:20"
                      }
                    ],
                    "id": 6556,
                    "name": "ExpressionStatement",
                    "src": "7501:69:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "contract IBondedECDSAKeepFactory"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "fullyBackedFactory",
                              "referencedDeclaration": 6326,
                              "type": "contract IBondedECDSAKeepFactory"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6529,
                                  "type": "struct KeepFactorySelection.Storage storage pointer",
                                  "value": "_self"
                                },
                                "id": 6557,
                                "name": "Identifier",
                                "src": "7580:5:20"
                              }
                            ],
                            "id": 6559,
                            "name": "MemberAccess",
                            "src": "7580:24:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "contract IBondedECDSAKeepFactory",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 11467,
                                  "type": "type(contract IBondedECDSAKeepFactory)",
                                  "value": "IBondedECDSAKeepFactory"
                                },
                                "id": 6560,
                                "name": "Identifier",
                                "src": "7607:23:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6533,
                                  "type": "address",
                                  "value": "_fullyBackedFactory"
                                },
                                "id": 6561,
                                "name": "Identifier",
                                "src": "7631:19:20"
                              }
                            ],
                            "id": 6562,
                            "name": "FunctionCall",
                            "src": "7607:44:20"
                          }
                        ],
                        "id": 6563,
                        "name": "Assignment",
                        "src": "7580:71:20"
                      }
                    ],
                    "id": 6564,
                    "name": "ExpressionStatement",
                    "src": "7580:71:20"
                  },
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "operator": "=",
                          "type": "contract KeepFactorySelector"
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": true,
                              "member_name": "factorySelector",
                              "referencedDeclaration": 6322,
                              "type": "contract KeepFactorySelector"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6529,
                                  "type": "struct KeepFactorySelection.Storage storage pointer",
                                  "value": "_self"
                                },
                                "id": 6565,
                                "name": "Identifier",
                                "src": "7661:5:20"
                              }
                            ],
                            "id": 6567,
                            "name": "MemberAccess",
                            "src": "7661:21:20"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "isStructConstructorCall": false,
                              "lValueRequested": false,
                              "names": [
                                null
                              ],
                              "type": "contract KeepFactorySelector",
                              "type_conversion": true
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_address",
                                      "typeString": "address"
                                    }
                                  ],
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6316,
                                  "type": "type(contract KeepFactorySelector)",
                                  "value": "KeepFactorySelector"
                                },
                                "id": 6568,
                                "name": "Identifier",
                                "src": "7685:19:20"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 6535,
                                  "type": "address",
                                  "value": "_factorySelector"
                                },
                                "id": 6569,
                                "name": "Identifier",
                                "src": "7705:16:20"
                              }
                            ],
                            "id": 6570,
                            "name": "FunctionCall",
                            "src": "7685:37:20"
                          }
                        ],
                        "id": 6571,
                        "name": "Assignment",
                        "src": "7661:61:20"
                      }
                    ],
                    "id": 6572,
                    "name": "ExpressionStatement",
                    "src": "7661:61:20"
                  }
                ],
                "id": 6573,
                "name": "Block",
                "src": "7357:372:20"
              }
            ],
            "id": 6574,
            "name": "FunctionDefinition",
            "src": "7182:547:20"
          }
        ],
        "id": 6575,
        "name": "ContractDefinition",
        "src": "1274:6457:20"
      }
    ],
    "id": 6576,
    "name": "SourceUnit",
    "src": "0:7732:20"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.17+commit.d19bba13.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.3.4",
  "updatedAt": "2021-11-23T11:52:09.291Z",
  "devdoc": {
    "methods": {
      "selectFactory(uint256,address,address)": {
        "params": {
          "_fullyBackedFactory": "Fully backed, ETH-bond-only based keep factory.",
          "_keepStakedFactory": "Regular, KEEP-stake based keep factory.",
          "_seed": "Request seed."
        },
        "return": "The selected keep factory."
      }
    },
    "title": "Bonded ECDSA keep factory selection strategy."
  },
  "userdoc": {
    "methods": {
      "selectFactory(uint256,address,address)": {
        "notice": "Selects keep factory for the new deposit."
      }
    },
    "notice": "The strategy defines the algorithm for selecting a factory. tBTC uses two bonded ECDSA keep factories, selecting one of them for each new deposit being opened."
  }
}