{
  "contractName": "CheckpointingHelpers",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"@aragonone/voting-connectors-contract-utils/contracts/CheckpointingHelpers.sol\":\"CheckpointingHelpers\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":10000},\"remappings\":[]},\"sources\":{\"@aragonone/voting-connectors-contract-utils/contracts/CheckpointingHelpers.sol\":{\"keccak256\":\"0x842f94c1bd4fc1cab0273138b432e723cedcd8bf9a59ec38550a8b619a92a02d\",\"urls\":[\"bzzr://ab15e73a508883816a8d699b6f9266e56a3cc2412df09b78fa2f9e6b3ae16cc2\"]}},\"version\":1}",
  "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582027bef73454592bf34baa7e17a12e0e08f5d3f6a706c64904035431657aabc9090029",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a7230582027bef73454592bf34baa7e17a12e0e08f5d3f6a706c64904035431657aabc9090029",
  "sourceMap": "27:627:62:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24",
  "deployedSourceMap": "27:627:62:-;;;;;;;;",
  "source": "pragma solidity ^0.4.24;\n\n\nlibrary CheckpointingHelpers {\n    uint256 private constant MAX_UINT64 = uint64(-1);\n    uint256 private constant MAX_UINT192 = uint192(-1);\n\n    string private constant ERROR_UINT64_TOO_BIG = \"UINT64_NUMBER_TOO_BIG\";\n    string private constant ERROR_UINT192_TOO_BIG = \"UINT192_NUMBER_TOO_BIG\";\n\n    function toUint64Time(uint256 _a) internal pure returns (uint64) {\n        require(_a <= MAX_UINT64, ERROR_UINT64_TOO_BIG);\n        return uint64(_a);\n    }\n\n    function toUint192Value(uint256 _a) internal pure returns (uint192) {\n        require(_a <= MAX_UINT192, ERROR_UINT192_TOO_BIG);\n        return uint192(_a);\n    }\n}\n",
  "sourcePath": "@aragonone/voting-connectors-contract-utils/contracts/CheckpointingHelpers.sol",
  "ast": {
    "absolutePath": "@aragonone/voting-connectors-contract-utils/contracts/CheckpointingHelpers.sol",
    "exportedSymbols": {
      "CheckpointingHelpers": [
        10291
      ]
    },
    "id": 10292,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 10234,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:62"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 10291,
        "linearizedBaseContracts": [
          10291
        ],
        "name": "CheckpointingHelpers",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 10240,
            "name": "MAX_UINT64",
            "nodeType": "VariableDeclaration",
            "scope": 10291,
            "src": "62:48:62",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10235,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "62:7:62",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "arguments": [
                {
                  "argumentTypes": null,
                  "id": 10238,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "nodeType": "UnaryOperation",
                  "operator": "-",
                  "prefix": true,
                  "src": "107:2:62",
                  "subExpression": {
                    "argumentTypes": null,
                    "hexValue": "31",
                    "id": 10237,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "108:1:62",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1_by_1",
                      "typeString": "int_const 1"
                    },
                    "value": "1"
                  },
                  "typeDescriptions": {
                    "typeIdentifier": "t_rational_-1_by_1",
                    "typeString": "int_const -1"
                  }
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_rational_-1_by_1",
                    "typeString": "int_const -1"
                  }
                ],
                "id": 10236,
                "isConstant": false,
                "isLValue": false,
                "isPure": true,
                "lValueRequested": false,
                "nodeType": "ElementaryTypeNameExpression",
                "src": "100:6:62",
                "typeDescriptions": {
                  "typeIdentifier": "t_type$_t_uint64_$",
                  "typeString": "type(uint64)"
                },
                "typeName": "uint64"
              },
              "id": 10239,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "typeConversion",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "100:10:62",
              "typeDescriptions": {
                "typeIdentifier": "t_uint64",
                "typeString": "uint64"
              }
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 10246,
            "name": "MAX_UINT192",
            "nodeType": "VariableDeclaration",
            "scope": 10291,
            "src": "116:50:62",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10241,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "116:7:62",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "arguments": [
                {
                  "argumentTypes": null,
                  "id": 10244,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "nodeType": "UnaryOperation",
                  "operator": "-",
                  "prefix": true,
                  "src": "163:2:62",
                  "subExpression": {
                    "argumentTypes": null,
                    "hexValue": "31",
                    "id": 10243,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "164:1:62",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1_by_1",
                      "typeString": "int_const 1"
                    },
                    "value": "1"
                  },
                  "typeDescriptions": {
                    "typeIdentifier": "t_rational_-1_by_1",
                    "typeString": "int_const -1"
                  }
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_rational_-1_by_1",
                    "typeString": "int_const -1"
                  }
                ],
                "id": 10242,
                "isConstant": false,
                "isLValue": false,
                "isPure": true,
                "lValueRequested": false,
                "nodeType": "ElementaryTypeNameExpression",
                "src": "155:7:62",
                "typeDescriptions": {
                  "typeIdentifier": "t_type$_t_uint192_$",
                  "typeString": "type(uint192)"
                },
                "typeName": "uint192"
              },
              "id": 10245,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "typeConversion",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "155:11:62",
              "typeDescriptions": {
                "typeIdentifier": "t_uint192",
                "typeString": "uint192"
              }
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 10249,
            "name": "ERROR_UINT64_TOO_BIG",
            "nodeType": "VariableDeclaration",
            "scope": 10291,
            "src": "173:70:62",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_memory",
              "typeString": "string"
            },
            "typeName": {
              "id": 10247,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "173:6:62",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "55494e5436345f4e554d4245525f544f4f5f424947",
              "id": 10248,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "220:23:62",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_0097450fa85b09f7141faf60e71f2a076ecfed0c9fa787056beef57ff0d975db",
                "typeString": "literal_string \"UINT64_NUMBER_TOO_BIG\""
              },
              "value": "UINT64_NUMBER_TOO_BIG"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 10252,
            "name": "ERROR_UINT192_TOO_BIG",
            "nodeType": "VariableDeclaration",
            "scope": 10291,
            "src": "249:72:62",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_memory",
              "typeString": "string"
            },
            "typeName": {
              "id": 10250,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "249:6:62",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "55494e543139325f4e554d4245525f544f4f5f424947",
              "id": 10251,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "297:24:62",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_71010f2c60a9a1c48601c25e446c769bda4d7a541809ce9b8d2cb16e4ae3a8ea",
                "typeString": "literal_string \"UINT192_NUMBER_TOO_BIG\""
              },
              "value": "UINT192_NUMBER_TOO_BIG"
            },
            "visibility": "private"
          },
          {
            "body": {
              "id": 10270,
              "nodeType": "Block",
              "src": "393:91:62",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 10262,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 10260,
                          "name": "_a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10254,
                          "src": "411:2:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 10261,
                          "name": "MAX_UINT64",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10240,
                          "src": "417:10:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "411:16:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 10263,
                        "name": "ERROR_UINT64_TOO_BIG",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10249,
                        "src": "429:20:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      ],
                      "id": 10259,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        10407,
                        10408
                      ],
                      "referencedDeclaration": 10408,
                      "src": "403:7:62",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 10264,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "403:47:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 10265,
                  "nodeType": "ExpressionStatement",
                  "src": "403:47:62"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 10267,
                        "name": "_a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10254,
                        "src": "474:2:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 10266,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "467:6:62",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint64_$",
                        "typeString": "type(uint64)"
                      },
                      "typeName": "uint64"
                    },
                    "id": 10268,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "467:10:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "functionReturnParameters": 10258,
                  "id": 10269,
                  "nodeType": "Return",
                  "src": "460:17:62"
                }
              ]
            },
            "documentation": null,
            "id": 10271,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "toUint64Time",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10255,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10254,
                  "name": "_a",
                  "nodeType": "VariableDeclaration",
                  "scope": 10271,
                  "src": "350:10:62",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10253,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "350:7:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "349:12:62"
            },
            "payable": false,
            "returnParameters": {
              "id": 10258,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10257,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 10271,
                  "src": "385:6:62",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 10256,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "385:6:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "384:8:62"
            },
            "scope": 10291,
            "src": "328:156:62",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 10289,
              "nodeType": "Block",
              "src": "558:94:62",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 10281,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 10279,
                          "name": "_a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10273,
                          "src": "576:2:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 10280,
                          "name": "MAX_UINT192",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10246,
                          "src": "582:11:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "576:17:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 10282,
                        "name": "ERROR_UINT192_TOO_BIG",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10252,
                        "src": "595:21:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      ],
                      "id": 10278,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        10407,
                        10408
                      ],
                      "referencedDeclaration": 10408,
                      "src": "568:7:62",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 10283,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "568:49:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 10284,
                  "nodeType": "ExpressionStatement",
                  "src": "568:49:62"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 10286,
                        "name": "_a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10273,
                        "src": "642:2:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 10285,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "634:7:62",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint192_$",
                        "typeString": "type(uint192)"
                      },
                      "typeName": "uint192"
                    },
                    "id": 10287,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "634:11:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint192",
                      "typeString": "uint192"
                    }
                  },
                  "functionReturnParameters": 10277,
                  "id": 10288,
                  "nodeType": "Return",
                  "src": "627:18:62"
                }
              ]
            },
            "documentation": null,
            "id": 10290,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "toUint192Value",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10274,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10273,
                  "name": "_a",
                  "nodeType": "VariableDeclaration",
                  "scope": 10290,
                  "src": "514:10:62",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10272,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "514:7:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "513:12:62"
            },
            "payable": false,
            "returnParameters": {
              "id": 10277,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10276,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 10290,
                  "src": "549:7:62",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint192",
                    "typeString": "uint192"
                  },
                  "typeName": {
                    "id": 10275,
                    "name": "uint192",
                    "nodeType": "ElementaryTypeName",
                    "src": "549:7:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint192",
                      "typeString": "uint192"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "548:9:62"
            },
            "scope": 10291,
            "src": "490:162:62",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 10292,
        "src": "27:627:62"
      }
    ],
    "src": "0:655:62"
  },
  "legacyAST": {
    "absolutePath": "@aragonone/voting-connectors-contract-utils/contracts/CheckpointingHelpers.sol",
    "exportedSymbols": {
      "CheckpointingHelpers": [
        10291
      ]
    },
    "id": 10292,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 10234,
        "literals": [
          "solidity",
          "^",
          "0.4",
          ".24"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:24:62"
      },
      {
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 10291,
        "linearizedBaseContracts": [
          10291
        ],
        "name": "CheckpointingHelpers",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "constant": true,
            "id": 10240,
            "name": "MAX_UINT64",
            "nodeType": "VariableDeclaration",
            "scope": 10291,
            "src": "62:48:62",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10235,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "62:7:62",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "arguments": [
                {
                  "argumentTypes": null,
                  "id": 10238,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "nodeType": "UnaryOperation",
                  "operator": "-",
                  "prefix": true,
                  "src": "107:2:62",
                  "subExpression": {
                    "argumentTypes": null,
                    "hexValue": "31",
                    "id": 10237,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "108:1:62",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1_by_1",
                      "typeString": "int_const 1"
                    },
                    "value": "1"
                  },
                  "typeDescriptions": {
                    "typeIdentifier": "t_rational_-1_by_1",
                    "typeString": "int_const -1"
                  }
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_rational_-1_by_1",
                    "typeString": "int_const -1"
                  }
                ],
                "id": 10236,
                "isConstant": false,
                "isLValue": false,
                "isPure": true,
                "lValueRequested": false,
                "nodeType": "ElementaryTypeNameExpression",
                "src": "100:6:62",
                "typeDescriptions": {
                  "typeIdentifier": "t_type$_t_uint64_$",
                  "typeString": "type(uint64)"
                },
                "typeName": "uint64"
              },
              "id": 10239,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "typeConversion",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "100:10:62",
              "typeDescriptions": {
                "typeIdentifier": "t_uint64",
                "typeString": "uint64"
              }
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 10246,
            "name": "MAX_UINT192",
            "nodeType": "VariableDeclaration",
            "scope": 10291,
            "src": "116:50:62",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_uint256",
              "typeString": "uint256"
            },
            "typeName": {
              "id": 10241,
              "name": "uint256",
              "nodeType": "ElementaryTypeName",
              "src": "116:7:62",
              "typeDescriptions": {
                "typeIdentifier": "t_uint256",
                "typeString": "uint256"
              }
            },
            "value": {
              "argumentTypes": null,
              "arguments": [
                {
                  "argumentTypes": null,
                  "id": 10244,
                  "isConstant": false,
                  "isLValue": false,
                  "isPure": true,
                  "lValueRequested": false,
                  "nodeType": "UnaryOperation",
                  "operator": "-",
                  "prefix": true,
                  "src": "163:2:62",
                  "subExpression": {
                    "argumentTypes": null,
                    "hexValue": "31",
                    "id": 10243,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "164:1:62",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_1_by_1",
                      "typeString": "int_const 1"
                    },
                    "value": "1"
                  },
                  "typeDescriptions": {
                    "typeIdentifier": "t_rational_-1_by_1",
                    "typeString": "int_const -1"
                  }
                }
              ],
              "expression": {
                "argumentTypes": [
                  {
                    "typeIdentifier": "t_rational_-1_by_1",
                    "typeString": "int_const -1"
                  }
                ],
                "id": 10242,
                "isConstant": false,
                "isLValue": false,
                "isPure": true,
                "lValueRequested": false,
                "nodeType": "ElementaryTypeNameExpression",
                "src": "155:7:62",
                "typeDescriptions": {
                  "typeIdentifier": "t_type$_t_uint192_$",
                  "typeString": "type(uint192)"
                },
                "typeName": "uint192"
              },
              "id": 10245,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "typeConversion",
              "lValueRequested": false,
              "names": [],
              "nodeType": "FunctionCall",
              "src": "155:11:62",
              "typeDescriptions": {
                "typeIdentifier": "t_uint192",
                "typeString": "uint192"
              }
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 10249,
            "name": "ERROR_UINT64_TOO_BIG",
            "nodeType": "VariableDeclaration",
            "scope": 10291,
            "src": "173:70:62",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_memory",
              "typeString": "string"
            },
            "typeName": {
              "id": 10247,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "173:6:62",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "55494e5436345f4e554d4245525f544f4f5f424947",
              "id": 10248,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "220:23:62",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_0097450fa85b09f7141faf60e71f2a076ecfed0c9fa787056beef57ff0d975db",
                "typeString": "literal_string \"UINT64_NUMBER_TOO_BIG\""
              },
              "value": "UINT64_NUMBER_TOO_BIG"
            },
            "visibility": "private"
          },
          {
            "constant": true,
            "id": 10252,
            "name": "ERROR_UINT192_TOO_BIG",
            "nodeType": "VariableDeclaration",
            "scope": 10291,
            "src": "249:72:62",
            "stateVariable": true,
            "storageLocation": "default",
            "typeDescriptions": {
              "typeIdentifier": "t_string_memory",
              "typeString": "string"
            },
            "typeName": {
              "id": 10250,
              "name": "string",
              "nodeType": "ElementaryTypeName",
              "src": "249:6:62",
              "typeDescriptions": {
                "typeIdentifier": "t_string_storage_ptr",
                "typeString": "string"
              }
            },
            "value": {
              "argumentTypes": null,
              "hexValue": "55494e543139325f4e554d4245525f544f4f5f424947",
              "id": 10251,
              "isConstant": false,
              "isLValue": false,
              "isPure": true,
              "kind": "string",
              "lValueRequested": false,
              "nodeType": "Literal",
              "src": "297:24:62",
              "subdenomination": null,
              "typeDescriptions": {
                "typeIdentifier": "t_stringliteral_71010f2c60a9a1c48601c25e446c769bda4d7a541809ce9b8d2cb16e4ae3a8ea",
                "typeString": "literal_string \"UINT192_NUMBER_TOO_BIG\""
              },
              "value": "UINT192_NUMBER_TOO_BIG"
            },
            "visibility": "private"
          },
          {
            "body": {
              "id": 10270,
              "nodeType": "Block",
              "src": "393:91:62",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 10262,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 10260,
                          "name": "_a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10254,
                          "src": "411:2:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 10261,
                          "name": "MAX_UINT64",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10240,
                          "src": "417:10:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "411:16:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 10263,
                        "name": "ERROR_UINT64_TOO_BIG",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10249,
                        "src": "429:20:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      ],
                      "id": 10259,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        10407,
                        10408
                      ],
                      "referencedDeclaration": 10408,
                      "src": "403:7:62",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 10264,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "403:47:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 10265,
                  "nodeType": "ExpressionStatement",
                  "src": "403:47:62"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 10267,
                        "name": "_a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10254,
                        "src": "474:2:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 10266,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "467:6:62",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint64_$",
                        "typeString": "type(uint64)"
                      },
                      "typeName": "uint64"
                    },
                    "id": 10268,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "467:10:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "functionReturnParameters": 10258,
                  "id": 10269,
                  "nodeType": "Return",
                  "src": "460:17:62"
                }
              ]
            },
            "documentation": null,
            "id": 10271,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "toUint64Time",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10255,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10254,
                  "name": "_a",
                  "nodeType": "VariableDeclaration",
                  "scope": 10271,
                  "src": "350:10:62",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10253,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "350:7:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "349:12:62"
            },
            "payable": false,
            "returnParameters": {
              "id": 10258,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10257,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 10271,
                  "src": "385:6:62",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 10256,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "385:6:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "384:8:62"
            },
            "scope": 10291,
            "src": "328:156:62",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 10289,
              "nodeType": "Block",
              "src": "558:94:62",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 10281,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 10279,
                          "name": "_a",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10273,
                          "src": "576:2:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "argumentTypes": null,
                          "id": 10280,
                          "name": "MAX_UINT192",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10246,
                          "src": "582:11:62",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "576:17:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "id": 10282,
                        "name": "ERROR_UINT192_TOO_BIG",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10252,
                        "src": "595:21:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_string_memory",
                          "typeString": "string memory"
                        }
                      ],
                      "id": 10278,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        10407,
                        10408
                      ],
                      "referencedDeclaration": 10408,
                      "src": "568:7:62",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 10283,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "568:49:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 10284,
                  "nodeType": "ExpressionStatement",
                  "src": "568:49:62"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 10286,
                        "name": "_a",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10273,
                        "src": "642:2:62",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 10285,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "634:7:62",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint192_$",
                        "typeString": "type(uint192)"
                      },
                      "typeName": "uint192"
                    },
                    "id": 10287,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "634:11:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint192",
                      "typeString": "uint192"
                    }
                  },
                  "functionReturnParameters": 10277,
                  "id": 10288,
                  "nodeType": "Return",
                  "src": "627:18:62"
                }
              ]
            },
            "documentation": null,
            "id": 10290,
            "implemented": true,
            "isConstructor": false,
            "isDeclaredConst": true,
            "modifiers": [],
            "name": "toUint192Value",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10274,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10273,
                  "name": "_a",
                  "nodeType": "VariableDeclaration",
                  "scope": 10290,
                  "src": "514:10:62",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10272,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "514:7:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "513:12:62"
            },
            "payable": false,
            "returnParameters": {
              "id": 10277,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10276,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 10290,
                  "src": "549:7:62",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint192",
                    "typeString": "uint192"
                  },
                  "typeName": {
                    "id": 10275,
                    "name": "uint192",
                    "nodeType": "ElementaryTypeName",
                    "src": "549:7:62",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint192",
                      "typeString": "uint192"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "548:9:62"
            },
            "scope": 10291,
            "src": "490:162:62",
            "stateMutability": "pure",
            "superFunction": null,
            "visibility": "internal"
          }
        ],
        "scope": 10292,
        "src": "27:627:62"
      }
    ],
    "src": "0:655:62"
  },
  "compiler": {
    "name": "solc",
    "version": "0.4.24+commit.e67f0147.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.2.0",
  "updatedAt": "2020-06-07T23:27:00.624Z",
  "devdoc": {
    "methods": {}
  },
  "userdoc": {
    "methods": {}
  }
}