{
  "contractName": "SafeCast",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.8.11+commit.d7f03943\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Wrappers over Solidity's uintXX/intXX casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always. Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing all math on `uint256` and `int256` and then downcasting.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":\"SafeCast\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0x5c6caab697d302ad7eb59c234a4d2dbc965c1bae87709bd2850060b7695b28c7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://fb62abcee612c175f1b9bc70e5dfe5bd23473c99987ade6e80e291f68dc60ff1\",\"dweb:/ipfs/QmZCMajhG7FtRYNDwBchXN89mXR6HLPVzr9732qfUdNf9E\"]}},\"version\":1}",
  "bytecode": "0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220502a113fac4ad73c9fa38e6fe911ca6a5224c1961ba7551ddbfd53bb39fd181d64736f6c634300080b0033",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea2646970667358221220502a113fac4ad73c9fa38e6fe911ca6a5224c1961ba7551ddbfd53bb39fd181d64736f6c634300080b0033",
  "immutableReferences": {},
  "generatedSources": [],
  "deployedGeneratedSources": [],
  "sourceMap": "827:6990:36:-:0;;;;;;;;;;;;;;;-1:-1:-1;;;827:6990:36;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "827:6990:36:-:0;;;;;;;;",
  "source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n *\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n * all math on `uint256` and `int256` and then downcasting.\n */\nlibrary SafeCast {\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        require(value <= type(uint224).max, \"SafeCast: value doesn't fit in 224 bits\");\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        require(value <= type(uint128).max, \"SafeCast: value doesn't fit in 128 bits\");\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        require(value <= type(uint96).max, \"SafeCast: value doesn't fit in 96 bits\");\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        require(value <= type(uint64).max, \"SafeCast: value doesn't fit in 64 bits\");\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        require(value <= type(uint32).max, \"SafeCast: value doesn't fit in 32 bits\");\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        require(value <= type(uint16).max, \"SafeCast: value doesn't fit in 16 bits\");\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits.\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        require(value <= type(uint8).max, \"SafeCast: value doesn't fit in 8 bits\");\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        require(value >= 0, \"SafeCast: value must be positive\");\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt128(int256 value) internal pure returns (int128) {\n        require(value >= type(int128).min && value <= type(int128).max, \"SafeCast: value doesn't fit in 128 bits\");\n        return int128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt64(int256 value) internal pure returns (int64) {\n        require(value >= type(int64).min && value <= type(int64).max, \"SafeCast: value doesn't fit in 64 bits\");\n        return int64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt32(int256 value) internal pure returns (int32) {\n        require(value >= type(int32).min && value <= type(int32).max, \"SafeCast: value doesn't fit in 32 bits\");\n        return int32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     *\n     * _Available since v3.1._\n     */\n    function toInt16(int256 value) internal pure returns (int16) {\n        require(value >= type(int16).min && value <= type(int16).max, \"SafeCast: value doesn't fit in 16 bits\");\n        return int16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits.\n     *\n     * _Available since v3.1._\n     */\n    function toInt8(int256 value) internal pure returns (int8) {\n        require(value >= type(int8).min && value <= type(int8).max, \"SafeCast: value doesn't fit in 8 bits\");\n        return int8(value);\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        require(value <= uint256(type(int256).max), \"SafeCast: value doesn't fit in an int256\");\n        return int256(value);\n    }\n}\n",
  "sourcePath": "@openzeppelin/contracts/utils/math/SafeCast.sol",
  "ast": {
    "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol",
    "exportedSymbols": {
      "SafeCast": [
        6745
      ]
    },
    "id": 6746,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6354,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "92:23:36"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "canonicalName": "SafeCast",
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 6355,
          "nodeType": "StructuredDocumentation",
          "src": "117:709:36",
          "text": " @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n checks.\n Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n easily result in undesired exploitation or bugs, since developers usually\n assume that overflows raise errors. `SafeCast` restores this intuition by\n reverting the transaction when such an operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always.\n Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n all math on `uint256` and `int256` and then downcasting."
        },
        "fullyImplemented": true,
        "id": 6745,
        "linearizedBaseContracts": [
          6745
        ],
        "name": "SafeCast",
        "nameLocation": "835:8:36",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 6379,
              "nodeType": "Block",
              "src": "1201:126:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6370,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6364,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6358,
                          "src": "1219:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6367,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1233:7:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint224_$",
                                  "typeString": "type(uint224)"
                                },
                                "typeName": {
                                  "id": 6366,
                                  "name": "uint224",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "1233:7:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint224_$",
                                  "typeString": "type(uint224)"
                                }
                              ],
                              "id": 6365,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "1228:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6368,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1228:13:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint224",
                              "typeString": "type(uint224)"
                            }
                          },
                          "id": 6369,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "1228:17:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint224",
                            "typeString": "uint224"
                          }
                        },
                        "src": "1219:26:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203232342062697473",
                        "id": 6371,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1247:41:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_9d2acf551b2466898443b9bc3a403a4d86037386bc5a8960c1bbb0f204e69b79",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 224 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 224 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_9d2acf551b2466898443b9bc3a403a4d86037386bc5a8960c1bbb0f204e69b79",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 224 bits\""
                        }
                      ],
                      "id": 6363,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "1211:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6372,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1211:78:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6373,
                  "nodeType": "ExpressionStatement",
                  "src": "1211:78:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6376,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6358,
                        "src": "1314:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6375,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "1306:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint224_$",
                        "typeString": "type(uint224)"
                      },
                      "typeName": {
                        "id": 6374,
                        "name": "uint224",
                        "nodeType": "ElementaryTypeName",
                        "src": "1306:7:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6377,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1306:14:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint224",
                      "typeString": "uint224"
                    }
                  },
                  "functionReturnParameters": 6362,
                  "id": 6378,
                  "nodeType": "Return",
                  "src": "1299:21:36"
                }
              ]
            },
            "documentation": {
              "id": 6356,
              "nodeType": "StructuredDocumentation",
              "src": "850:280:36",
              "text": " @dev Returns the downcasted uint224 from uint256, reverting on\n overflow (when the input is greater than largest uint224).\n Counterpart to Solidity's `uint224` operator.\n Requirements:\n - input must fit into 224 bits"
            },
            "id": 6380,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint224",
            "nameLocation": "1144:9:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6359,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6358,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "1162:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6380,
                  "src": "1154:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6357,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1154:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1153:15:36"
            },
            "returnParameters": {
              "id": 6362,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6361,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6380,
                  "src": "1192:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint224",
                    "typeString": "uint224"
                  },
                  "typeName": {
                    "id": 6360,
                    "name": "uint224",
                    "nodeType": "ElementaryTypeName",
                    "src": "1192:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint224",
                      "typeString": "uint224"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1191:9:36"
            },
            "scope": 6745,
            "src": "1135:192:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6404,
              "nodeType": "Block",
              "src": "1684:126:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6395,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6389,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6383,
                          "src": "1702:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6392,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1716:7:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint128_$",
                                  "typeString": "type(uint128)"
                                },
                                "typeName": {
                                  "id": 6391,
                                  "name": "uint128",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "1716:7:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint128_$",
                                  "typeString": "type(uint128)"
                                }
                              ],
                              "id": 6390,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "1711:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6393,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1711:13:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint128",
                              "typeString": "type(uint128)"
                            }
                          },
                          "id": 6394,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "1711:17:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint128",
                            "typeString": "uint128"
                          }
                        },
                        "src": "1702:26:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203132382062697473",
                        "id": 6396,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1730:41:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 128 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
                        }
                      ],
                      "id": 6388,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "1694:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6397,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1694:78:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6398,
                  "nodeType": "ExpressionStatement",
                  "src": "1694:78:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6401,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6383,
                        "src": "1797:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6400,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "1789:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint128_$",
                        "typeString": "type(uint128)"
                      },
                      "typeName": {
                        "id": 6399,
                        "name": "uint128",
                        "nodeType": "ElementaryTypeName",
                        "src": "1789:7:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6402,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1789:14:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "functionReturnParameters": 6387,
                  "id": 6403,
                  "nodeType": "Return",
                  "src": "1782:21:36"
                }
              ]
            },
            "documentation": {
              "id": 6381,
              "nodeType": "StructuredDocumentation",
              "src": "1333:280:36",
              "text": " @dev Returns the downcasted uint128 from uint256, reverting on\n overflow (when the input is greater than largest uint128).\n Counterpart to Solidity's `uint128` operator.\n Requirements:\n - input must fit into 128 bits"
            },
            "id": 6405,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint128",
            "nameLocation": "1627:9:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6384,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6383,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "1645:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6405,
                  "src": "1637:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6382,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1637:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1636:15:36"
            },
            "returnParameters": {
              "id": 6387,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6386,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6405,
                  "src": "1675:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint128",
                    "typeString": "uint128"
                  },
                  "typeName": {
                    "id": 6385,
                    "name": "uint128",
                    "nodeType": "ElementaryTypeName",
                    "src": "1675:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1674:9:36"
            },
            "scope": 6745,
            "src": "1618:192:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6429,
              "nodeType": "Block",
              "src": "2161:123:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6420,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6414,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6408,
                          "src": "2179:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6417,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2193:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint96_$",
                                  "typeString": "type(uint96)"
                                },
                                "typeName": {
                                  "id": 6416,
                                  "name": "uint96",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2193:6:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint96_$",
                                  "typeString": "type(uint96)"
                                }
                              ],
                              "id": 6415,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "2188:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6418,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2188:12:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint96",
                              "typeString": "type(uint96)"
                            }
                          },
                          "id": 6419,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "2188:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint96",
                            "typeString": "uint96"
                          }
                        },
                        "src": "2179:25:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2039362062697473",
                        "id": 6421,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2206:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_06d20189090e973729391526269baef79c35dd621633195648e5f8309eef9e19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 96 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 96 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_06d20189090e973729391526269baef79c35dd621633195648e5f8309eef9e19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 96 bits\""
                        }
                      ],
                      "id": 6413,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "2171:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6422,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2171:76:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6423,
                  "nodeType": "ExpressionStatement",
                  "src": "2171:76:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6426,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6408,
                        "src": "2271:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6425,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "2264:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint96_$",
                        "typeString": "type(uint96)"
                      },
                      "typeName": {
                        "id": 6424,
                        "name": "uint96",
                        "nodeType": "ElementaryTypeName",
                        "src": "2264:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6427,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2264:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint96",
                      "typeString": "uint96"
                    }
                  },
                  "functionReturnParameters": 6412,
                  "id": 6428,
                  "nodeType": "Return",
                  "src": "2257:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6406,
              "nodeType": "StructuredDocumentation",
              "src": "1816:276:36",
              "text": " @dev Returns the downcasted uint96 from uint256, reverting on\n overflow (when the input is greater than largest uint96).\n Counterpart to Solidity's `uint96` operator.\n Requirements:\n - input must fit into 96 bits"
            },
            "id": 6430,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint96",
            "nameLocation": "2106:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6409,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6408,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "2123:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6430,
                  "src": "2115:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6407,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2115:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2114:15:36"
            },
            "returnParameters": {
              "id": 6412,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6411,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6430,
                  "src": "2153:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint96",
                    "typeString": "uint96"
                  },
                  "typeName": {
                    "id": 6410,
                    "name": "uint96",
                    "nodeType": "ElementaryTypeName",
                    "src": "2153:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint96",
                      "typeString": "uint96"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2152:8:36"
            },
            "scope": 6745,
            "src": "2097:187:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6454,
              "nodeType": "Block",
              "src": "2635:123:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6445,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6439,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6433,
                          "src": "2653:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6442,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2667:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint64_$",
                                  "typeString": "type(uint64)"
                                },
                                "typeName": {
                                  "id": 6441,
                                  "name": "uint64",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2667:6:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint64_$",
                                  "typeString": "type(uint64)"
                                }
                              ],
                              "id": 6440,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "2662:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6443,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2662:12:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint64",
                              "typeString": "type(uint64)"
                            }
                          },
                          "id": 6444,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "2662:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint64",
                            "typeString": "uint64"
                          }
                        },
                        "src": "2653:25:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2036342062697473",
                        "id": 6446,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2680:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 64 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
                        }
                      ],
                      "id": 6438,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "2645:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6447,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2645:76:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6448,
                  "nodeType": "ExpressionStatement",
                  "src": "2645:76:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6451,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6433,
                        "src": "2745:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6450,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "2738:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint64_$",
                        "typeString": "type(uint64)"
                      },
                      "typeName": {
                        "id": 6449,
                        "name": "uint64",
                        "nodeType": "ElementaryTypeName",
                        "src": "2738:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6452,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2738:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "functionReturnParameters": 6437,
                  "id": 6453,
                  "nodeType": "Return",
                  "src": "2731:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6431,
              "nodeType": "StructuredDocumentation",
              "src": "2290:276:36",
              "text": " @dev Returns the downcasted uint64 from uint256, reverting on\n overflow (when the input is greater than largest uint64).\n Counterpart to Solidity's `uint64` operator.\n Requirements:\n - input must fit into 64 bits"
            },
            "id": 6455,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint64",
            "nameLocation": "2580:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6434,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6433,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "2597:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6455,
                  "src": "2589:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6432,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2589:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2588:15:36"
            },
            "returnParameters": {
              "id": 6437,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6436,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6455,
                  "src": "2627:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 6435,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "2627:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2626:8:36"
            },
            "scope": 6745,
            "src": "2571:187:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6479,
              "nodeType": "Block",
              "src": "3109:123:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6470,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6464,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6458,
                          "src": "3127:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6467,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3141:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint32_$",
                                  "typeString": "type(uint32)"
                                },
                                "typeName": {
                                  "id": 6466,
                                  "name": "uint32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3141:6:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint32_$",
                                  "typeString": "type(uint32)"
                                }
                              ],
                              "id": 6465,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "3136:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6468,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3136:12:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint32",
                              "typeString": "type(uint32)"
                            }
                          },
                          "id": 6469,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "3136:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint32",
                            "typeString": "uint32"
                          }
                        },
                        "src": "3127:25:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2033322062697473",
                        "id": 6471,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3154:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 32 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
                        }
                      ],
                      "id": 6463,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "3119:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6472,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3119:76:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6473,
                  "nodeType": "ExpressionStatement",
                  "src": "3119:76:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6476,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6458,
                        "src": "3219:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6475,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "3212:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint32_$",
                        "typeString": "type(uint32)"
                      },
                      "typeName": {
                        "id": 6474,
                        "name": "uint32",
                        "nodeType": "ElementaryTypeName",
                        "src": "3212:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6477,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3212:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "functionReturnParameters": 6462,
                  "id": 6478,
                  "nodeType": "Return",
                  "src": "3205:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6456,
              "nodeType": "StructuredDocumentation",
              "src": "2764:276:36",
              "text": " @dev Returns the downcasted uint32 from uint256, reverting on\n overflow (when the input is greater than largest uint32).\n Counterpart to Solidity's `uint32` operator.\n Requirements:\n - input must fit into 32 bits"
            },
            "id": 6480,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint32",
            "nameLocation": "3054:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6459,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6458,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "3071:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6480,
                  "src": "3063:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6457,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3063:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3062:15:36"
            },
            "returnParameters": {
              "id": 6462,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6461,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6480,
                  "src": "3101:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 6460,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3101:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3100:8:36"
            },
            "scope": 6745,
            "src": "3045:187:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6504,
              "nodeType": "Block",
              "src": "3583:123:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6495,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6489,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6483,
                          "src": "3601:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6492,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3615:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint16_$",
                                  "typeString": "type(uint16)"
                                },
                                "typeName": {
                                  "id": 6491,
                                  "name": "uint16",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3615:6:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint16_$",
                                  "typeString": "type(uint16)"
                                }
                              ],
                              "id": 6490,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "3610:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6493,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3610:12:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint16",
                              "typeString": "type(uint16)"
                            }
                          },
                          "id": 6494,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "3610:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint16",
                            "typeString": "uint16"
                          }
                        },
                        "src": "3601:25:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2031362062697473",
                        "id": 6496,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3628:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 16 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
                        }
                      ],
                      "id": 6488,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "3593:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6497,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3593:76:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6498,
                  "nodeType": "ExpressionStatement",
                  "src": "3593:76:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6501,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6483,
                        "src": "3693:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6500,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "3686:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint16_$",
                        "typeString": "type(uint16)"
                      },
                      "typeName": {
                        "id": 6499,
                        "name": "uint16",
                        "nodeType": "ElementaryTypeName",
                        "src": "3686:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6502,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3686:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint16",
                      "typeString": "uint16"
                    }
                  },
                  "functionReturnParameters": 6487,
                  "id": 6503,
                  "nodeType": "Return",
                  "src": "3679:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6481,
              "nodeType": "StructuredDocumentation",
              "src": "3238:276:36",
              "text": " @dev Returns the downcasted uint16 from uint256, reverting on\n overflow (when the input is greater than largest uint16).\n Counterpart to Solidity's `uint16` operator.\n Requirements:\n - input must fit into 16 bits"
            },
            "id": 6505,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint16",
            "nameLocation": "3528:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6484,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6483,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "3545:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6505,
                  "src": "3537:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6482,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3537:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3536:15:36"
            },
            "returnParameters": {
              "id": 6487,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6486,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6505,
                  "src": "3575:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint16",
                    "typeString": "uint16"
                  },
                  "typeName": {
                    "id": 6485,
                    "name": "uint16",
                    "nodeType": "ElementaryTypeName",
                    "src": "3575:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint16",
                      "typeString": "uint16"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3574:8:36"
            },
            "scope": 6745,
            "src": "3519:187:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6529,
              "nodeType": "Block",
              "src": "4052:120:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6520,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6514,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6508,
                          "src": "4070:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6517,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4084:5:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint8_$",
                                  "typeString": "type(uint8)"
                                },
                                "typeName": {
                                  "id": 6516,
                                  "name": "uint8",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4084:5:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint8_$",
                                  "typeString": "type(uint8)"
                                }
                              ],
                              "id": 6515,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "4079:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6518,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4079:11:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint8",
                              "typeString": "type(uint8)"
                            }
                          },
                          "id": 6519,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "4079:15:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "src": "4070:24:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20382062697473",
                        "id": 6521,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4096:39:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 8 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
                        }
                      ],
                      "id": 6513,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "4062:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6522,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4062:74:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6523,
                  "nodeType": "ExpressionStatement",
                  "src": "4062:74:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6526,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6508,
                        "src": "4159:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6525,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "4153:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint8_$",
                        "typeString": "type(uint8)"
                      },
                      "typeName": {
                        "id": 6524,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "4153:5:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6527,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4153:12:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "functionReturnParameters": 6512,
                  "id": 6528,
                  "nodeType": "Return",
                  "src": "4146:19:36"
                }
              ]
            },
            "documentation": {
              "id": 6506,
              "nodeType": "StructuredDocumentation",
              "src": "3712:273:36",
              "text": " @dev Returns the downcasted uint8 from uint256, reverting on\n overflow (when the input is greater than largest uint8).\n Counterpart to Solidity's `uint8` operator.\n Requirements:\n - input must fit into 8 bits."
            },
            "id": 6530,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint8",
            "nameLocation": "3999:7:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6509,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6508,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "4015:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6530,
                  "src": "4007:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6507,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4007:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4006:15:36"
            },
            "returnParameters": {
              "id": 6512,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6511,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6530,
                  "src": "4045:5:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 6510,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "4045:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4044:7:36"
            },
            "scope": 6745,
            "src": "3990:182:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6550,
              "nodeType": "Block",
              "src": "4408:103:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 6541,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6539,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6533,
                          "src": "4426:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 6540,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4435:1:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "4426:10:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c7565206d75737420626520706f736974697665",
                        "id": 6542,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4438:34:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_74e6d3a4204092bea305532ded31d3763fc378e46be3884a93ceff08a0761807",
                          "typeString": "literal_string \"SafeCast: value must be positive\""
                        },
                        "value": "SafeCast: value must be positive"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_74e6d3a4204092bea305532ded31d3763fc378e46be3884a93ceff08a0761807",
                          "typeString": "literal_string \"SafeCast: value must be positive\""
                        }
                      ],
                      "id": 6538,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "4418:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6543,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4418:55:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6544,
                  "nodeType": "ExpressionStatement",
                  "src": "4418:55:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6547,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6533,
                        "src": "4498:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6546,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "4490:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint256_$",
                        "typeString": "type(uint256)"
                      },
                      "typeName": {
                        "id": 6545,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4490:7:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6548,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4490:14:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 6537,
                  "id": 6549,
                  "nodeType": "Return",
                  "src": "4483:21:36"
                }
              ]
            },
            "documentation": {
              "id": 6531,
              "nodeType": "StructuredDocumentation",
              "src": "4178:160:36",
              "text": " @dev Converts a signed int256 into an unsigned uint256.\n Requirements:\n - input must be greater than or equal to 0."
            },
            "id": 6551,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint256",
            "nameLocation": "4352:9:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6534,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6533,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "4369:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6551,
                  "src": "4362:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6532,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4362:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4361:14:36"
            },
            "returnParameters": {
              "id": 6537,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6536,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6551,
                  "src": "4399:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6535,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4399:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4398:9:36"
            },
            "scope": 6745,
            "src": "4343:168:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6583,
              "nodeType": "Block",
              "src": "4935:153:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6574,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6566,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6560,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6554,
                            "src": "4953:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6563,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "4967:6:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int128_$",
                                    "typeString": "type(int128)"
                                  },
                                  "typeName": {
                                    "id": 6562,
                                    "name": "int128",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4967:6:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int128_$",
                                    "typeString": "type(int128)"
                                  }
                                ],
                                "id": 6561,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "4962:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6564,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4962:12:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int128",
                                "typeString": "type(int128)"
                              }
                            },
                            "id": 6565,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "4962:16:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int128",
                              "typeString": "int128"
                            }
                          },
                          "src": "4953:25:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6573,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6567,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6554,
                            "src": "4982:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6570,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "4996:6:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int128_$",
                                    "typeString": "type(int128)"
                                  },
                                  "typeName": {
                                    "id": 6569,
                                    "name": "int128",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4996:6:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int128_$",
                                    "typeString": "type(int128)"
                                  }
                                ],
                                "id": 6568,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "4991:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6571,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4991:12:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int128",
                                "typeString": "type(int128)"
                              }
                            },
                            "id": 6572,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "4991:16:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int128",
                              "typeString": "int128"
                            }
                          },
                          "src": "4982:25:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "4953:54:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203132382062697473",
                        "id": 6575,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "5009:41:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 128 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
                        }
                      ],
                      "id": 6559,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "4945:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6576,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4945:106:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6577,
                  "nodeType": "ExpressionStatement",
                  "src": "4945:106:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6580,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6554,
                        "src": "5075:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6579,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "5068:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int128_$",
                        "typeString": "type(int128)"
                      },
                      "typeName": {
                        "id": 6578,
                        "name": "int128",
                        "nodeType": "ElementaryTypeName",
                        "src": "5068:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6581,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5068:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int128",
                      "typeString": "int128"
                    }
                  },
                  "functionReturnParameters": 6558,
                  "id": 6582,
                  "nodeType": "Return",
                  "src": "5061:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6552,
              "nodeType": "StructuredDocumentation",
              "src": "4517:350:36",
              "text": " @dev Returns the downcasted int128 from int256, reverting on\n overflow (when the input is less than smallest int128 or\n greater than largest int128).\n Counterpart to Solidity's `int128` operator.\n Requirements:\n - input must fit into 128 bits\n _Available since v3.1._"
            },
            "id": 6584,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt128",
            "nameLocation": "4881:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6555,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6554,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "4897:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6584,
                  "src": "4890:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6553,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4890:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4889:14:36"
            },
            "returnParameters": {
              "id": 6558,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6557,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6584,
                  "src": "4927:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int128",
                    "typeString": "int128"
                  },
                  "typeName": {
                    "id": 6556,
                    "name": "int128",
                    "nodeType": "ElementaryTypeName",
                    "src": "4927:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int128",
                      "typeString": "int128"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4926:8:36"
            },
            "scope": 6745,
            "src": "4872:216:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6616,
              "nodeType": "Block",
              "src": "5505:149:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6607,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6599,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6593,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6587,
                            "src": "5523:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6596,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "5537:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int64_$",
                                    "typeString": "type(int64)"
                                  },
                                  "typeName": {
                                    "id": 6595,
                                    "name": "int64",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5537:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int64_$",
                                    "typeString": "type(int64)"
                                  }
                                ],
                                "id": 6594,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "5532:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6597,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5532:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int64",
                                "typeString": "type(int64)"
                              }
                            },
                            "id": 6598,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "5532:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int64",
                              "typeString": "int64"
                            }
                          },
                          "src": "5523:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6606,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6600,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6587,
                            "src": "5551:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6603,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "5565:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int64_$",
                                    "typeString": "type(int64)"
                                  },
                                  "typeName": {
                                    "id": 6602,
                                    "name": "int64",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5565:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int64_$",
                                    "typeString": "type(int64)"
                                  }
                                ],
                                "id": 6601,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "5560:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6604,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5560:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int64",
                                "typeString": "type(int64)"
                              }
                            },
                            "id": 6605,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "5560:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int64",
                              "typeString": "int64"
                            }
                          },
                          "src": "5551:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "5523:52:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2036342062697473",
                        "id": 6608,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "5577:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 64 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
                        }
                      ],
                      "id": 6592,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "5515:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6609,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5515:103:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6610,
                  "nodeType": "ExpressionStatement",
                  "src": "5515:103:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6613,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6587,
                        "src": "5641:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6612,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "5635:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int64_$",
                        "typeString": "type(int64)"
                      },
                      "typeName": {
                        "id": 6611,
                        "name": "int64",
                        "nodeType": "ElementaryTypeName",
                        "src": "5635:5:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6614,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5635:12:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int64",
                      "typeString": "int64"
                    }
                  },
                  "functionReturnParameters": 6591,
                  "id": 6615,
                  "nodeType": "Return",
                  "src": "5628:19:36"
                }
              ]
            },
            "documentation": {
              "id": 6585,
              "nodeType": "StructuredDocumentation",
              "src": "5094:345:36",
              "text": " @dev Returns the downcasted int64 from int256, reverting on\n overflow (when the input is less than smallest int64 or\n greater than largest int64).\n Counterpart to Solidity's `int64` operator.\n Requirements:\n - input must fit into 64 bits\n _Available since v3.1._"
            },
            "id": 6617,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt64",
            "nameLocation": "5453:7:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6588,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6587,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "5468:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6617,
                  "src": "5461:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6586,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5461:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5460:14:36"
            },
            "returnParameters": {
              "id": 6591,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6590,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6617,
                  "src": "5498:5:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int64",
                    "typeString": "int64"
                  },
                  "typeName": {
                    "id": 6589,
                    "name": "int64",
                    "nodeType": "ElementaryTypeName",
                    "src": "5498:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int64",
                      "typeString": "int64"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5497:7:36"
            },
            "scope": 6745,
            "src": "5444:210:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6649,
              "nodeType": "Block",
              "src": "6071:149:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6640,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6632,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6626,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6620,
                            "src": "6089:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6629,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6103:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int32_$",
                                    "typeString": "type(int32)"
                                  },
                                  "typeName": {
                                    "id": 6628,
                                    "name": "int32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6103:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int32_$",
                                    "typeString": "type(int32)"
                                  }
                                ],
                                "id": 6627,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "6098:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6630,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6098:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int32",
                                "typeString": "type(int32)"
                              }
                            },
                            "id": 6631,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "6098:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int32",
                              "typeString": "int32"
                            }
                          },
                          "src": "6089:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6639,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6633,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6620,
                            "src": "6117:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6636,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6131:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int32_$",
                                    "typeString": "type(int32)"
                                  },
                                  "typeName": {
                                    "id": 6635,
                                    "name": "int32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6131:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int32_$",
                                    "typeString": "type(int32)"
                                  }
                                ],
                                "id": 6634,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "6126:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6637,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6126:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int32",
                                "typeString": "type(int32)"
                              }
                            },
                            "id": 6638,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "6126:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int32",
                              "typeString": "int32"
                            }
                          },
                          "src": "6117:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "6089:52:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2033322062697473",
                        "id": 6641,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6143:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 32 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
                        }
                      ],
                      "id": 6625,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "6081:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6642,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6081:103:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6643,
                  "nodeType": "ExpressionStatement",
                  "src": "6081:103:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6646,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6620,
                        "src": "6207:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6645,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "6201:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int32_$",
                        "typeString": "type(int32)"
                      },
                      "typeName": {
                        "id": 6644,
                        "name": "int32",
                        "nodeType": "ElementaryTypeName",
                        "src": "6201:5:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6647,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6201:12:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int32",
                      "typeString": "int32"
                    }
                  },
                  "functionReturnParameters": 6624,
                  "id": 6648,
                  "nodeType": "Return",
                  "src": "6194:19:36"
                }
              ]
            },
            "documentation": {
              "id": 6618,
              "nodeType": "StructuredDocumentation",
              "src": "5660:345:36",
              "text": " @dev Returns the downcasted int32 from int256, reverting on\n overflow (when the input is less than smallest int32 or\n greater than largest int32).\n Counterpart to Solidity's `int32` operator.\n Requirements:\n - input must fit into 32 bits\n _Available since v3.1._"
            },
            "id": 6650,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt32",
            "nameLocation": "6019:7:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6621,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6620,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "6034:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6650,
                  "src": "6027:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6619,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6027:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6026:14:36"
            },
            "returnParameters": {
              "id": 6624,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6623,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6650,
                  "src": "6064:5:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int32",
                    "typeString": "int32"
                  },
                  "typeName": {
                    "id": 6622,
                    "name": "int32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6064:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int32",
                      "typeString": "int32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6063:7:36"
            },
            "scope": 6745,
            "src": "6010:210:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6682,
              "nodeType": "Block",
              "src": "6637:149:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6673,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6665,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6659,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6653,
                            "src": "6655:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6662,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6669:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int16_$",
                                    "typeString": "type(int16)"
                                  },
                                  "typeName": {
                                    "id": 6661,
                                    "name": "int16",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6669:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int16_$",
                                    "typeString": "type(int16)"
                                  }
                                ],
                                "id": 6660,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "6664:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6663,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6664:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int16",
                                "typeString": "type(int16)"
                              }
                            },
                            "id": 6664,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "6664:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int16",
                              "typeString": "int16"
                            }
                          },
                          "src": "6655:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6672,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6666,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6653,
                            "src": "6683:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6669,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6697:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int16_$",
                                    "typeString": "type(int16)"
                                  },
                                  "typeName": {
                                    "id": 6668,
                                    "name": "int16",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6697:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int16_$",
                                    "typeString": "type(int16)"
                                  }
                                ],
                                "id": 6667,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "6692:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6670,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6692:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int16",
                                "typeString": "type(int16)"
                              }
                            },
                            "id": 6671,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "6692:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int16",
                              "typeString": "int16"
                            }
                          },
                          "src": "6683:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "6655:52:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2031362062697473",
                        "id": 6674,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6709:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 16 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
                        }
                      ],
                      "id": 6658,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "6647:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6675,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6647:103:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6676,
                  "nodeType": "ExpressionStatement",
                  "src": "6647:103:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6679,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6653,
                        "src": "6773:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6678,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "6767:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int16_$",
                        "typeString": "type(int16)"
                      },
                      "typeName": {
                        "id": 6677,
                        "name": "int16",
                        "nodeType": "ElementaryTypeName",
                        "src": "6767:5:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6680,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6767:12:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int16",
                      "typeString": "int16"
                    }
                  },
                  "functionReturnParameters": 6657,
                  "id": 6681,
                  "nodeType": "Return",
                  "src": "6760:19:36"
                }
              ]
            },
            "documentation": {
              "id": 6651,
              "nodeType": "StructuredDocumentation",
              "src": "6226:345:36",
              "text": " @dev Returns the downcasted int16 from int256, reverting on\n overflow (when the input is less than smallest int16 or\n greater than largest int16).\n Counterpart to Solidity's `int16` operator.\n Requirements:\n - input must fit into 16 bits\n _Available since v3.1._"
            },
            "id": 6683,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt16",
            "nameLocation": "6585:7:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6654,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6653,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "6600:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6683,
                  "src": "6593:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6652,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6593:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6592:14:36"
            },
            "returnParameters": {
              "id": 6657,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6656,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6683,
                  "src": "6630:5:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int16",
                    "typeString": "int16"
                  },
                  "typeName": {
                    "id": 6655,
                    "name": "int16",
                    "nodeType": "ElementaryTypeName",
                    "src": "6630:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int16",
                      "typeString": "int16"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6629:7:36"
            },
            "scope": 6745,
            "src": "6576:210:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6715,
              "nodeType": "Block",
              "src": "7197:145:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6706,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6698,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6692,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6686,
                            "src": "7215:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6695,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "7229:4:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int8_$",
                                    "typeString": "type(int8)"
                                  },
                                  "typeName": {
                                    "id": 6694,
                                    "name": "int8",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "7229:4:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int8_$",
                                    "typeString": "type(int8)"
                                  }
                                ],
                                "id": 6693,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "7224:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6696,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7224:10:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int8",
                                "typeString": "type(int8)"
                              }
                            },
                            "id": 6697,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "7224:14:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int8",
                              "typeString": "int8"
                            }
                          },
                          "src": "7215:23:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6705,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6699,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6686,
                            "src": "7242:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6702,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "7256:4:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int8_$",
                                    "typeString": "type(int8)"
                                  },
                                  "typeName": {
                                    "id": 6701,
                                    "name": "int8",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "7256:4:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int8_$",
                                    "typeString": "type(int8)"
                                  }
                                ],
                                "id": 6700,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "7251:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6703,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7251:10:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int8",
                                "typeString": "type(int8)"
                              }
                            },
                            "id": 6704,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "7251:14:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int8",
                              "typeString": "int8"
                            }
                          },
                          "src": "7242:23:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "7215:50:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20382062697473",
                        "id": 6707,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7267:39:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 8 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
                        }
                      ],
                      "id": 6691,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "7207:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6708,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7207:100:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6709,
                  "nodeType": "ExpressionStatement",
                  "src": "7207:100:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6712,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6686,
                        "src": "7329:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6711,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "7324:4:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int8_$",
                        "typeString": "type(int8)"
                      },
                      "typeName": {
                        "id": 6710,
                        "name": "int8",
                        "nodeType": "ElementaryTypeName",
                        "src": "7324:4:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6713,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7324:11:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int8",
                      "typeString": "int8"
                    }
                  },
                  "functionReturnParameters": 6690,
                  "id": 6714,
                  "nodeType": "Return",
                  "src": "7317:18:36"
                }
              ]
            },
            "documentation": {
              "id": 6684,
              "nodeType": "StructuredDocumentation",
              "src": "6792:341:36",
              "text": " @dev Returns the downcasted int8 from int256, reverting on\n overflow (when the input is less than smallest int8 or\n greater than largest int8).\n Counterpart to Solidity's `int8` operator.\n Requirements:\n - input must fit into 8 bits.\n _Available since v3.1._"
            },
            "id": 6716,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt8",
            "nameLocation": "7147:6:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6687,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6686,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "7161:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6716,
                  "src": "7154:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6685,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7154:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7153:14:36"
            },
            "returnParameters": {
              "id": 6690,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6689,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6716,
                  "src": "7191:4:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int8",
                    "typeString": "int8"
                  },
                  "typeName": {
                    "id": 6688,
                    "name": "int8",
                    "nodeType": "ElementaryTypeName",
                    "src": "7191:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int8",
                      "typeString": "int8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7190:6:36"
            },
            "scope": 6745,
            "src": "7138:204:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6743,
              "nodeType": "Block",
              "src": "7582:233:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6734,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6725,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6719,
                          "src": "7699:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "arguments": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 6730,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "7721:6:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_int256_$",
                                      "typeString": "type(int256)"
                                    },
                                    "typeName": {
                                      "id": 6729,
                                      "name": "int256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "7721:6:36",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_type$_t_int256_$",
                                      "typeString": "type(int256)"
                                    }
                                  ],
                                  "id": 6728,
                                  "name": "type",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4294967269,
                                  "src": "7716:4:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                    "typeString": "function () pure"
                                  }
                                },
                                "id": 6731,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7716:12:36",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_meta_type_t_int256",
                                  "typeString": "type(int256)"
                                }
                              },
                              "id": 6732,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "max",
                              "nodeType": "MemberAccess",
                              "src": "7716:16:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            ],
                            "id": 6727,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "7708:7:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            },
                            "typeName": {
                              "id": 6726,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7708:7:36",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 6733,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7708:25:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "7699:34:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20616e20696e74323536",
                        "id": 6735,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7735:42:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_d70dcf21692b3c91b4c5fbb89ed57f464aa42efbe5b0ea96c4acb7c080144227",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in an int256\""
                        },
                        "value": "SafeCast: value doesn't fit in an int256"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_d70dcf21692b3c91b4c5fbb89ed57f464aa42efbe5b0ea96c4acb7c080144227",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in an int256\""
                        }
                      ],
                      "id": 6724,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "7691:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6736,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7691:87:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6737,
                  "nodeType": "ExpressionStatement",
                  "src": "7691:87:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6740,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6719,
                        "src": "7802:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6739,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "7795:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int256_$",
                        "typeString": "type(int256)"
                      },
                      "typeName": {
                        "id": 6738,
                        "name": "int256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7795:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6741,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7795:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "functionReturnParameters": 6723,
                  "id": 6742,
                  "nodeType": "Return",
                  "src": "7788:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6717,
              "nodeType": "StructuredDocumentation",
              "src": "7348:165:36",
              "text": " @dev Converts an unsigned uint256 into a signed int256.\n Requirements:\n - input must be less than or equal to maxInt256."
            },
            "id": 6744,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt256",
            "nameLocation": "7527:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6720,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6719,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "7544:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6744,
                  "src": "7536:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6718,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7536:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7535:15:36"
            },
            "returnParameters": {
              "id": 6723,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6722,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6744,
                  "src": "7574:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6721,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7574:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7573:8:36"
            },
            "scope": 6745,
            "src": "7518:297:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 6746,
        "src": "827:6990:36",
        "usedErrors": []
      }
    ],
    "src": "92:7726:36"
  },
  "legacyAST": {
    "absolutePath": "@openzeppelin/contracts/utils/math/SafeCast.sol",
    "exportedSymbols": {
      "SafeCast": [
        6745
      ]
    },
    "id": 6746,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6354,
        "literals": [
          "solidity",
          "^",
          "0.8",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "92:23:36"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "canonicalName": "SafeCast",
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": {
          "id": 6355,
          "nodeType": "StructuredDocumentation",
          "src": "117:709:36",
          "text": " @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow\n checks.\n Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n easily result in undesired exploitation or bugs, since developers usually\n assume that overflows raise errors. `SafeCast` restores this intuition by\n reverting the transaction when such an operation overflows.\n Using this library instead of the unchecked operations eliminates an entire\n class of bugs, so it's recommended to use it always.\n Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\n all math on `uint256` and `int256` and then downcasting."
        },
        "fullyImplemented": true,
        "id": 6745,
        "linearizedBaseContracts": [
          6745
        ],
        "name": "SafeCast",
        "nameLocation": "835:8:36",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 6379,
              "nodeType": "Block",
              "src": "1201:126:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6370,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6364,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6358,
                          "src": "1219:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6367,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1233:7:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint224_$",
                                  "typeString": "type(uint224)"
                                },
                                "typeName": {
                                  "id": 6366,
                                  "name": "uint224",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "1233:7:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint224_$",
                                  "typeString": "type(uint224)"
                                }
                              ],
                              "id": 6365,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "1228:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6368,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1228:13:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint224",
                              "typeString": "type(uint224)"
                            }
                          },
                          "id": 6369,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "1228:17:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint224",
                            "typeString": "uint224"
                          }
                        },
                        "src": "1219:26:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203232342062697473",
                        "id": 6371,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1247:41:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_9d2acf551b2466898443b9bc3a403a4d86037386bc5a8960c1bbb0f204e69b79",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 224 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 224 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_9d2acf551b2466898443b9bc3a403a4d86037386bc5a8960c1bbb0f204e69b79",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 224 bits\""
                        }
                      ],
                      "id": 6363,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "1211:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6372,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1211:78:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6373,
                  "nodeType": "ExpressionStatement",
                  "src": "1211:78:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6376,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6358,
                        "src": "1314:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6375,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "1306:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint224_$",
                        "typeString": "type(uint224)"
                      },
                      "typeName": {
                        "id": 6374,
                        "name": "uint224",
                        "nodeType": "ElementaryTypeName",
                        "src": "1306:7:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6377,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1306:14:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint224",
                      "typeString": "uint224"
                    }
                  },
                  "functionReturnParameters": 6362,
                  "id": 6378,
                  "nodeType": "Return",
                  "src": "1299:21:36"
                }
              ]
            },
            "documentation": {
              "id": 6356,
              "nodeType": "StructuredDocumentation",
              "src": "850:280:36",
              "text": " @dev Returns the downcasted uint224 from uint256, reverting on\n overflow (when the input is greater than largest uint224).\n Counterpart to Solidity's `uint224` operator.\n Requirements:\n - input must fit into 224 bits"
            },
            "id": 6380,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint224",
            "nameLocation": "1144:9:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6359,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6358,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "1162:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6380,
                  "src": "1154:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6357,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1154:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1153:15:36"
            },
            "returnParameters": {
              "id": 6362,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6361,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6380,
                  "src": "1192:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint224",
                    "typeString": "uint224"
                  },
                  "typeName": {
                    "id": 6360,
                    "name": "uint224",
                    "nodeType": "ElementaryTypeName",
                    "src": "1192:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint224",
                      "typeString": "uint224"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1191:9:36"
            },
            "scope": 6745,
            "src": "1135:192:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6404,
              "nodeType": "Block",
              "src": "1684:126:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6395,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6389,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6383,
                          "src": "1702:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6392,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "1716:7:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint128_$",
                                  "typeString": "type(uint128)"
                                },
                                "typeName": {
                                  "id": 6391,
                                  "name": "uint128",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "1716:7:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint128_$",
                                  "typeString": "type(uint128)"
                                }
                              ],
                              "id": 6390,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "1711:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6393,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "1711:13:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint128",
                              "typeString": "type(uint128)"
                            }
                          },
                          "id": 6394,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "1711:17:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint128",
                            "typeString": "uint128"
                          }
                        },
                        "src": "1702:26:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203132382062697473",
                        "id": 6396,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1730:41:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 128 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
                        }
                      ],
                      "id": 6388,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "1694:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6397,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1694:78:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6398,
                  "nodeType": "ExpressionStatement",
                  "src": "1694:78:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6401,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6383,
                        "src": "1797:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6400,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "1789:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint128_$",
                        "typeString": "type(uint128)"
                      },
                      "typeName": {
                        "id": 6399,
                        "name": "uint128",
                        "nodeType": "ElementaryTypeName",
                        "src": "1789:7:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6402,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "1789:14:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "functionReturnParameters": 6387,
                  "id": 6403,
                  "nodeType": "Return",
                  "src": "1782:21:36"
                }
              ]
            },
            "documentation": {
              "id": 6381,
              "nodeType": "StructuredDocumentation",
              "src": "1333:280:36",
              "text": " @dev Returns the downcasted uint128 from uint256, reverting on\n overflow (when the input is greater than largest uint128).\n Counterpart to Solidity's `uint128` operator.\n Requirements:\n - input must fit into 128 bits"
            },
            "id": 6405,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint128",
            "nameLocation": "1627:9:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6384,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6383,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "1645:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6405,
                  "src": "1637:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6382,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1637:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1636:15:36"
            },
            "returnParameters": {
              "id": 6387,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6386,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6405,
                  "src": "1675:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint128",
                    "typeString": "uint128"
                  },
                  "typeName": {
                    "id": 6385,
                    "name": "uint128",
                    "nodeType": "ElementaryTypeName",
                    "src": "1675:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "1674:9:36"
            },
            "scope": 6745,
            "src": "1618:192:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6429,
              "nodeType": "Block",
              "src": "2161:123:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6420,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6414,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6408,
                          "src": "2179:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6417,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2193:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint96_$",
                                  "typeString": "type(uint96)"
                                },
                                "typeName": {
                                  "id": 6416,
                                  "name": "uint96",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2193:6:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint96_$",
                                  "typeString": "type(uint96)"
                                }
                              ],
                              "id": 6415,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "2188:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6418,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2188:12:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint96",
                              "typeString": "type(uint96)"
                            }
                          },
                          "id": 6419,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "2188:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint96",
                            "typeString": "uint96"
                          }
                        },
                        "src": "2179:25:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2039362062697473",
                        "id": 6421,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2206:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_06d20189090e973729391526269baef79c35dd621633195648e5f8309eef9e19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 96 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 96 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_06d20189090e973729391526269baef79c35dd621633195648e5f8309eef9e19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 96 bits\""
                        }
                      ],
                      "id": 6413,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "2171:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6422,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2171:76:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6423,
                  "nodeType": "ExpressionStatement",
                  "src": "2171:76:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6426,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6408,
                        "src": "2271:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6425,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "2264:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint96_$",
                        "typeString": "type(uint96)"
                      },
                      "typeName": {
                        "id": 6424,
                        "name": "uint96",
                        "nodeType": "ElementaryTypeName",
                        "src": "2264:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6427,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2264:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint96",
                      "typeString": "uint96"
                    }
                  },
                  "functionReturnParameters": 6412,
                  "id": 6428,
                  "nodeType": "Return",
                  "src": "2257:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6406,
              "nodeType": "StructuredDocumentation",
              "src": "1816:276:36",
              "text": " @dev Returns the downcasted uint96 from uint256, reverting on\n overflow (when the input is greater than largest uint96).\n Counterpart to Solidity's `uint96` operator.\n Requirements:\n - input must fit into 96 bits"
            },
            "id": 6430,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint96",
            "nameLocation": "2106:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6409,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6408,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "2123:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6430,
                  "src": "2115:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6407,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2115:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2114:15:36"
            },
            "returnParameters": {
              "id": 6412,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6411,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6430,
                  "src": "2153:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint96",
                    "typeString": "uint96"
                  },
                  "typeName": {
                    "id": 6410,
                    "name": "uint96",
                    "nodeType": "ElementaryTypeName",
                    "src": "2153:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint96",
                      "typeString": "uint96"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2152:8:36"
            },
            "scope": 6745,
            "src": "2097:187:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6454,
              "nodeType": "Block",
              "src": "2635:123:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6445,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6439,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6433,
                          "src": "2653:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6442,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "2667:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint64_$",
                                  "typeString": "type(uint64)"
                                },
                                "typeName": {
                                  "id": 6441,
                                  "name": "uint64",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "2667:6:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint64_$",
                                  "typeString": "type(uint64)"
                                }
                              ],
                              "id": 6440,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "2662:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6443,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "2662:12:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint64",
                              "typeString": "type(uint64)"
                            }
                          },
                          "id": 6444,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "2662:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint64",
                            "typeString": "uint64"
                          }
                        },
                        "src": "2653:25:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2036342062697473",
                        "id": 6446,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2680:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 64 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
                        }
                      ],
                      "id": 6438,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "2645:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6447,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2645:76:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6448,
                  "nodeType": "ExpressionStatement",
                  "src": "2645:76:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6451,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6433,
                        "src": "2745:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6450,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "2738:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint64_$",
                        "typeString": "type(uint64)"
                      },
                      "typeName": {
                        "id": 6449,
                        "name": "uint64",
                        "nodeType": "ElementaryTypeName",
                        "src": "2738:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6452,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "2738:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "functionReturnParameters": 6437,
                  "id": 6453,
                  "nodeType": "Return",
                  "src": "2731:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6431,
              "nodeType": "StructuredDocumentation",
              "src": "2290:276:36",
              "text": " @dev Returns the downcasted uint64 from uint256, reverting on\n overflow (when the input is greater than largest uint64).\n Counterpart to Solidity's `uint64` operator.\n Requirements:\n - input must fit into 64 bits"
            },
            "id": 6455,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint64",
            "nameLocation": "2580:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6434,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6433,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "2597:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6455,
                  "src": "2589:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6432,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2589:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2588:15:36"
            },
            "returnParameters": {
              "id": 6437,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6436,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6455,
                  "src": "2627:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint64",
                    "typeString": "uint64"
                  },
                  "typeName": {
                    "id": 6435,
                    "name": "uint64",
                    "nodeType": "ElementaryTypeName",
                    "src": "2627:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint64",
                      "typeString": "uint64"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "2626:8:36"
            },
            "scope": 6745,
            "src": "2571:187:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6479,
              "nodeType": "Block",
              "src": "3109:123:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6470,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6464,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6458,
                          "src": "3127:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6467,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3141:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint32_$",
                                  "typeString": "type(uint32)"
                                },
                                "typeName": {
                                  "id": 6466,
                                  "name": "uint32",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3141:6:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint32_$",
                                  "typeString": "type(uint32)"
                                }
                              ],
                              "id": 6465,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "3136:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6468,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3136:12:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint32",
                              "typeString": "type(uint32)"
                            }
                          },
                          "id": 6469,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "3136:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint32",
                            "typeString": "uint32"
                          }
                        },
                        "src": "3127:25:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2033322062697473",
                        "id": 6471,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3154:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 32 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
                        }
                      ],
                      "id": 6463,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "3119:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6472,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3119:76:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6473,
                  "nodeType": "ExpressionStatement",
                  "src": "3119:76:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6476,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6458,
                        "src": "3219:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6475,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "3212:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint32_$",
                        "typeString": "type(uint32)"
                      },
                      "typeName": {
                        "id": 6474,
                        "name": "uint32",
                        "nodeType": "ElementaryTypeName",
                        "src": "3212:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6477,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3212:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "functionReturnParameters": 6462,
                  "id": 6478,
                  "nodeType": "Return",
                  "src": "3205:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6456,
              "nodeType": "StructuredDocumentation",
              "src": "2764:276:36",
              "text": " @dev Returns the downcasted uint32 from uint256, reverting on\n overflow (when the input is greater than largest uint32).\n Counterpart to Solidity's `uint32` operator.\n Requirements:\n - input must fit into 32 bits"
            },
            "id": 6480,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint32",
            "nameLocation": "3054:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6459,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6458,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "3071:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6480,
                  "src": "3063:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6457,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3063:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3062:15:36"
            },
            "returnParameters": {
              "id": 6462,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6461,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6480,
                  "src": "3101:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint32",
                    "typeString": "uint32"
                  },
                  "typeName": {
                    "id": 6460,
                    "name": "uint32",
                    "nodeType": "ElementaryTypeName",
                    "src": "3101:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint32",
                      "typeString": "uint32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3100:8:36"
            },
            "scope": 6745,
            "src": "3045:187:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6504,
              "nodeType": "Block",
              "src": "3583:123:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6495,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6489,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6483,
                          "src": "3601:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6492,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "3615:6:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint16_$",
                                  "typeString": "type(uint16)"
                                },
                                "typeName": {
                                  "id": 6491,
                                  "name": "uint16",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "3615:6:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint16_$",
                                  "typeString": "type(uint16)"
                                }
                              ],
                              "id": 6490,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "3610:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6493,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "3610:12:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint16",
                              "typeString": "type(uint16)"
                            }
                          },
                          "id": 6494,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "3610:16:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint16",
                            "typeString": "uint16"
                          }
                        },
                        "src": "3601:25:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2031362062697473",
                        "id": 6496,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "3628:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 16 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
                        }
                      ],
                      "id": 6488,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "3593:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6497,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3593:76:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6498,
                  "nodeType": "ExpressionStatement",
                  "src": "3593:76:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6501,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6483,
                        "src": "3693:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6500,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "3686:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint16_$",
                        "typeString": "type(uint16)"
                      },
                      "typeName": {
                        "id": 6499,
                        "name": "uint16",
                        "nodeType": "ElementaryTypeName",
                        "src": "3686:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6502,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "3686:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint16",
                      "typeString": "uint16"
                    }
                  },
                  "functionReturnParameters": 6487,
                  "id": 6503,
                  "nodeType": "Return",
                  "src": "3679:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6481,
              "nodeType": "StructuredDocumentation",
              "src": "3238:276:36",
              "text": " @dev Returns the downcasted uint16 from uint256, reverting on\n overflow (when the input is greater than largest uint16).\n Counterpart to Solidity's `uint16` operator.\n Requirements:\n - input must fit into 16 bits"
            },
            "id": 6505,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint16",
            "nameLocation": "3528:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6484,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6483,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "3545:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6505,
                  "src": "3537:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6482,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3537:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3536:15:36"
            },
            "returnParameters": {
              "id": 6487,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6486,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6505,
                  "src": "3575:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint16",
                    "typeString": "uint16"
                  },
                  "typeName": {
                    "id": 6485,
                    "name": "uint16",
                    "nodeType": "ElementaryTypeName",
                    "src": "3575:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint16",
                      "typeString": "uint16"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "3574:8:36"
            },
            "scope": 6745,
            "src": "3519:187:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6529,
              "nodeType": "Block",
              "src": "4052:120:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6520,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6514,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6508,
                          "src": "4070:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "expression": {
                            "arguments": [
                              {
                                "id": 6517,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "lValueRequested": false,
                                "nodeType": "ElementaryTypeNameExpression",
                                "src": "4084:5:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_uint8_$",
                                  "typeString": "type(uint8)"
                                },
                                "typeName": {
                                  "id": 6516,
                                  "name": "uint8",
                                  "nodeType": "ElementaryTypeName",
                                  "src": "4084:5:36",
                                  "typeDescriptions": {}
                                }
                              }
                            ],
                            "expression": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_type$_t_uint8_$",
                                  "typeString": "type(uint8)"
                                }
                              ],
                              "id": 6515,
                              "name": "type",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 4294967269,
                              "src": "4079:4:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                "typeString": "function () pure"
                              }
                            },
                            "id": 6518,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "functionCall",
                            "lValueRequested": false,
                            "names": [],
                            "nodeType": "FunctionCall",
                            "src": "4079:11:36",
                            "tryCall": false,
                            "typeDescriptions": {
                              "typeIdentifier": "t_magic_meta_type_t_uint8",
                              "typeString": "type(uint8)"
                            }
                          },
                          "id": 6519,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "memberName": "max",
                          "nodeType": "MemberAccess",
                          "src": "4079:15:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint8",
                            "typeString": "uint8"
                          }
                        },
                        "src": "4070:24:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20382062697473",
                        "id": 6521,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4096:39:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 8 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
                        }
                      ],
                      "id": 6513,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "4062:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6522,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4062:74:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6523,
                  "nodeType": "ExpressionStatement",
                  "src": "4062:74:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6526,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6508,
                        "src": "4159:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6525,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "4153:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint8_$",
                        "typeString": "type(uint8)"
                      },
                      "typeName": {
                        "id": 6524,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "4153:5:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6527,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4153:12:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "functionReturnParameters": 6512,
                  "id": 6528,
                  "nodeType": "Return",
                  "src": "4146:19:36"
                }
              ]
            },
            "documentation": {
              "id": 6506,
              "nodeType": "StructuredDocumentation",
              "src": "3712:273:36",
              "text": " @dev Returns the downcasted uint8 from uint256, reverting on\n overflow (when the input is greater than largest uint8).\n Counterpart to Solidity's `uint8` operator.\n Requirements:\n - input must fit into 8 bits."
            },
            "id": 6530,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint8",
            "nameLocation": "3999:7:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6509,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6508,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "4015:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6530,
                  "src": "4007:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6507,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4007:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4006:15:36"
            },
            "returnParameters": {
              "id": 6512,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6511,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6530,
                  "src": "4045:5:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 6510,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "4045:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4044:7:36"
            },
            "scope": 6745,
            "src": "3990:182:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6550,
              "nodeType": "Block",
              "src": "4408:103:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        },
                        "id": 6541,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6539,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6533,
                          "src": "4426:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": ">=",
                        "rightExpression": {
                          "hexValue": "30",
                          "id": 6540,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "4435:1:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "src": "4426:10:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c7565206d75737420626520706f736974697665",
                        "id": 6542,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "4438:34:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_74e6d3a4204092bea305532ded31d3763fc378e46be3884a93ceff08a0761807",
                          "typeString": "literal_string \"SafeCast: value must be positive\""
                        },
                        "value": "SafeCast: value must be positive"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_74e6d3a4204092bea305532ded31d3763fc378e46be3884a93ceff08a0761807",
                          "typeString": "literal_string \"SafeCast: value must be positive\""
                        }
                      ],
                      "id": 6538,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "4418:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6543,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4418:55:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6544,
                  "nodeType": "ExpressionStatement",
                  "src": "4418:55:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6547,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6533,
                        "src": "4498:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6546,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "4490:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint256_$",
                        "typeString": "type(uint256)"
                      },
                      "typeName": {
                        "id": 6545,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "4490:7:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6548,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4490:14:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 6537,
                  "id": 6549,
                  "nodeType": "Return",
                  "src": "4483:21:36"
                }
              ]
            },
            "documentation": {
              "id": 6531,
              "nodeType": "StructuredDocumentation",
              "src": "4178:160:36",
              "text": " @dev Converts a signed int256 into an unsigned uint256.\n Requirements:\n - input must be greater than or equal to 0."
            },
            "id": 6551,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint256",
            "nameLocation": "4352:9:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6534,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6533,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "4369:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6551,
                  "src": "4362:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6532,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4362:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4361:14:36"
            },
            "returnParameters": {
              "id": 6537,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6536,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6551,
                  "src": "4399:7:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6535,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4399:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4398:9:36"
            },
            "scope": 6745,
            "src": "4343:168:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6583,
              "nodeType": "Block",
              "src": "4935:153:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6574,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6566,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6560,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6554,
                            "src": "4953:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6563,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "4967:6:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int128_$",
                                    "typeString": "type(int128)"
                                  },
                                  "typeName": {
                                    "id": 6562,
                                    "name": "int128",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4967:6:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int128_$",
                                    "typeString": "type(int128)"
                                  }
                                ],
                                "id": 6561,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "4962:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6564,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4962:12:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int128",
                                "typeString": "type(int128)"
                              }
                            },
                            "id": 6565,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "4962:16:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int128",
                              "typeString": "int128"
                            }
                          },
                          "src": "4953:25:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6573,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6567,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6554,
                            "src": "4982:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6570,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "4996:6:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int128_$",
                                    "typeString": "type(int128)"
                                  },
                                  "typeName": {
                                    "id": 6569,
                                    "name": "int128",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "4996:6:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int128_$",
                                    "typeString": "type(int128)"
                                  }
                                ],
                                "id": 6568,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "4991:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6571,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "4991:12:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int128",
                                "typeString": "type(int128)"
                              }
                            },
                            "id": 6572,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "4991:16:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int128",
                              "typeString": "int128"
                            }
                          },
                          "src": "4982:25:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "4953:54:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e203132382062697473",
                        "id": 6575,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "5009:41:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 128 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_47a1e201974f94d3d1a31c8b08ae18c6966c758bdcd4400020012b98cc55426c",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 128 bits\""
                        }
                      ],
                      "id": 6559,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "4945:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6576,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "4945:106:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6577,
                  "nodeType": "ExpressionStatement",
                  "src": "4945:106:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6580,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6554,
                        "src": "5075:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6579,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "5068:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int128_$",
                        "typeString": "type(int128)"
                      },
                      "typeName": {
                        "id": 6578,
                        "name": "int128",
                        "nodeType": "ElementaryTypeName",
                        "src": "5068:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6581,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5068:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int128",
                      "typeString": "int128"
                    }
                  },
                  "functionReturnParameters": 6558,
                  "id": 6582,
                  "nodeType": "Return",
                  "src": "5061:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6552,
              "nodeType": "StructuredDocumentation",
              "src": "4517:350:36",
              "text": " @dev Returns the downcasted int128 from int256, reverting on\n overflow (when the input is less than smallest int128 or\n greater than largest int128).\n Counterpart to Solidity's `int128` operator.\n Requirements:\n - input must fit into 128 bits\n _Available since v3.1._"
            },
            "id": 6584,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt128",
            "nameLocation": "4881:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6555,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6554,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "4897:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6584,
                  "src": "4890:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6553,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4890:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4889:14:36"
            },
            "returnParameters": {
              "id": 6558,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6557,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6584,
                  "src": "4927:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int128",
                    "typeString": "int128"
                  },
                  "typeName": {
                    "id": 6556,
                    "name": "int128",
                    "nodeType": "ElementaryTypeName",
                    "src": "4927:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int128",
                      "typeString": "int128"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "4926:8:36"
            },
            "scope": 6745,
            "src": "4872:216:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6616,
              "nodeType": "Block",
              "src": "5505:149:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6607,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6599,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6593,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6587,
                            "src": "5523:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6596,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "5537:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int64_$",
                                    "typeString": "type(int64)"
                                  },
                                  "typeName": {
                                    "id": 6595,
                                    "name": "int64",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5537:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int64_$",
                                    "typeString": "type(int64)"
                                  }
                                ],
                                "id": 6594,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "5532:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6597,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5532:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int64",
                                "typeString": "type(int64)"
                              }
                            },
                            "id": 6598,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "5532:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int64",
                              "typeString": "int64"
                            }
                          },
                          "src": "5523:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6606,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6600,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6587,
                            "src": "5551:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6603,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "5565:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int64_$",
                                    "typeString": "type(int64)"
                                  },
                                  "typeName": {
                                    "id": 6602,
                                    "name": "int64",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "5565:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int64_$",
                                    "typeString": "type(int64)"
                                  }
                                ],
                                "id": 6601,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "5560:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6604,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "5560:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int64",
                                "typeString": "type(int64)"
                              }
                            },
                            "id": 6605,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "5560:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int64",
                              "typeString": "int64"
                            }
                          },
                          "src": "5551:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "5523:52:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2036342062697473",
                        "id": 6608,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "5577:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 64 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_93ae0c6bf6ffaece591a770b1865daa9f65157e541970aa9d8dc5f89a9490939",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 64 bits\""
                        }
                      ],
                      "id": 6592,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "5515:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6609,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5515:103:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6610,
                  "nodeType": "ExpressionStatement",
                  "src": "5515:103:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6613,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6587,
                        "src": "5641:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6612,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "5635:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int64_$",
                        "typeString": "type(int64)"
                      },
                      "typeName": {
                        "id": 6611,
                        "name": "int64",
                        "nodeType": "ElementaryTypeName",
                        "src": "5635:5:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6614,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "5635:12:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int64",
                      "typeString": "int64"
                    }
                  },
                  "functionReturnParameters": 6591,
                  "id": 6615,
                  "nodeType": "Return",
                  "src": "5628:19:36"
                }
              ]
            },
            "documentation": {
              "id": 6585,
              "nodeType": "StructuredDocumentation",
              "src": "5094:345:36",
              "text": " @dev Returns the downcasted int64 from int256, reverting on\n overflow (when the input is less than smallest int64 or\n greater than largest int64).\n Counterpart to Solidity's `int64` operator.\n Requirements:\n - input must fit into 64 bits\n _Available since v3.1._"
            },
            "id": 6617,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt64",
            "nameLocation": "5453:7:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6588,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6587,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "5468:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6617,
                  "src": "5461:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6586,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5461:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5460:14:36"
            },
            "returnParameters": {
              "id": 6591,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6590,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6617,
                  "src": "5498:5:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int64",
                    "typeString": "int64"
                  },
                  "typeName": {
                    "id": 6589,
                    "name": "int64",
                    "nodeType": "ElementaryTypeName",
                    "src": "5498:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int64",
                      "typeString": "int64"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "5497:7:36"
            },
            "scope": 6745,
            "src": "5444:210:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6649,
              "nodeType": "Block",
              "src": "6071:149:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6640,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6632,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6626,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6620,
                            "src": "6089:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6629,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6103:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int32_$",
                                    "typeString": "type(int32)"
                                  },
                                  "typeName": {
                                    "id": 6628,
                                    "name": "int32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6103:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int32_$",
                                    "typeString": "type(int32)"
                                  }
                                ],
                                "id": 6627,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "6098:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6630,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6098:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int32",
                                "typeString": "type(int32)"
                              }
                            },
                            "id": 6631,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "6098:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int32",
                              "typeString": "int32"
                            }
                          },
                          "src": "6089:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6639,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6633,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6620,
                            "src": "6117:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6636,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6131:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int32_$",
                                    "typeString": "type(int32)"
                                  },
                                  "typeName": {
                                    "id": 6635,
                                    "name": "int32",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6131:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int32_$",
                                    "typeString": "type(int32)"
                                  }
                                ],
                                "id": 6634,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "6126:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6637,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6126:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int32",
                                "typeString": "type(int32)"
                              }
                            },
                            "id": 6638,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "6126:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int32",
                              "typeString": "int32"
                            }
                          },
                          "src": "6117:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "6089:52:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2033322062697473",
                        "id": 6641,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6143:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 32 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_c907489dafcfb622d3b83f2657a14d6da2f59e0de3116af0d6a80554c1a7cb19",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 32 bits\""
                        }
                      ],
                      "id": 6625,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "6081:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6642,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6081:103:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6643,
                  "nodeType": "ExpressionStatement",
                  "src": "6081:103:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6646,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6620,
                        "src": "6207:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6645,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "6201:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int32_$",
                        "typeString": "type(int32)"
                      },
                      "typeName": {
                        "id": 6644,
                        "name": "int32",
                        "nodeType": "ElementaryTypeName",
                        "src": "6201:5:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6647,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6201:12:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int32",
                      "typeString": "int32"
                    }
                  },
                  "functionReturnParameters": 6624,
                  "id": 6648,
                  "nodeType": "Return",
                  "src": "6194:19:36"
                }
              ]
            },
            "documentation": {
              "id": 6618,
              "nodeType": "StructuredDocumentation",
              "src": "5660:345:36",
              "text": " @dev Returns the downcasted int32 from int256, reverting on\n overflow (when the input is less than smallest int32 or\n greater than largest int32).\n Counterpart to Solidity's `int32` operator.\n Requirements:\n - input must fit into 32 bits\n _Available since v3.1._"
            },
            "id": 6650,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt32",
            "nameLocation": "6019:7:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6621,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6620,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "6034:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6650,
                  "src": "6027:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6619,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6027:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6026:14:36"
            },
            "returnParameters": {
              "id": 6624,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6623,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6650,
                  "src": "6064:5:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int32",
                    "typeString": "int32"
                  },
                  "typeName": {
                    "id": 6622,
                    "name": "int32",
                    "nodeType": "ElementaryTypeName",
                    "src": "6064:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int32",
                      "typeString": "int32"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6063:7:36"
            },
            "scope": 6745,
            "src": "6010:210:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6682,
              "nodeType": "Block",
              "src": "6637:149:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6673,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6665,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6659,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6653,
                            "src": "6655:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6662,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6669:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int16_$",
                                    "typeString": "type(int16)"
                                  },
                                  "typeName": {
                                    "id": 6661,
                                    "name": "int16",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6669:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int16_$",
                                    "typeString": "type(int16)"
                                  }
                                ],
                                "id": 6660,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "6664:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6663,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6664:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int16",
                                "typeString": "type(int16)"
                              }
                            },
                            "id": 6664,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "6664:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int16",
                              "typeString": "int16"
                            }
                          },
                          "src": "6655:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6672,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6666,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6653,
                            "src": "6683:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6669,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "6697:5:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int16_$",
                                    "typeString": "type(int16)"
                                  },
                                  "typeName": {
                                    "id": 6668,
                                    "name": "int16",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "6697:5:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int16_$",
                                    "typeString": "type(int16)"
                                  }
                                ],
                                "id": 6667,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "6692:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6670,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "6692:11:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int16",
                                "typeString": "type(int16)"
                              }
                            },
                            "id": 6671,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "6692:15:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int16",
                              "typeString": "int16"
                            }
                          },
                          "src": "6683:24:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "6655:52:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e2031362062697473",
                        "id": 6674,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "6709:40:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 16 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_13d3a66f9e0e5c92bbe7743bcd3bdb4695009d5f3a96e5ff49718d715b484033",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 16 bits\""
                        }
                      ],
                      "id": 6658,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "6647:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6675,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6647:103:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6676,
                  "nodeType": "ExpressionStatement",
                  "src": "6647:103:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6679,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6653,
                        "src": "6773:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6678,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "6767:5:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int16_$",
                        "typeString": "type(int16)"
                      },
                      "typeName": {
                        "id": 6677,
                        "name": "int16",
                        "nodeType": "ElementaryTypeName",
                        "src": "6767:5:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6680,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "6767:12:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int16",
                      "typeString": "int16"
                    }
                  },
                  "functionReturnParameters": 6657,
                  "id": 6681,
                  "nodeType": "Return",
                  "src": "6760:19:36"
                }
              ]
            },
            "documentation": {
              "id": 6651,
              "nodeType": "StructuredDocumentation",
              "src": "6226:345:36",
              "text": " @dev Returns the downcasted int16 from int256, reverting on\n overflow (when the input is less than smallest int16 or\n greater than largest int16).\n Counterpart to Solidity's `int16` operator.\n Requirements:\n - input must fit into 16 bits\n _Available since v3.1._"
            },
            "id": 6683,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt16",
            "nameLocation": "6585:7:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6654,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6653,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "6600:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6683,
                  "src": "6593:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6652,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6593:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6592:14:36"
            },
            "returnParameters": {
              "id": 6657,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6656,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6683,
                  "src": "6630:5:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int16",
                    "typeString": "int16"
                  },
                  "typeName": {
                    "id": 6655,
                    "name": "int16",
                    "nodeType": "ElementaryTypeName",
                    "src": "6630:5:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int16",
                      "typeString": "int16"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "6629:7:36"
            },
            "scope": 6745,
            "src": "6576:210:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6715,
              "nodeType": "Block",
              "src": "7197:145:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        "id": 6706,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6698,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6692,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6686,
                            "src": "7215:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6695,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "7229:4:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int8_$",
                                    "typeString": "type(int8)"
                                  },
                                  "typeName": {
                                    "id": 6694,
                                    "name": "int8",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "7229:4:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int8_$",
                                    "typeString": "type(int8)"
                                  }
                                ],
                                "id": 6693,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "7224:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6696,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7224:10:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int8",
                                "typeString": "type(int8)"
                              }
                            },
                            "id": 6697,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "min",
                            "nodeType": "MemberAccess",
                            "src": "7224:14:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int8",
                              "typeString": "int8"
                            }
                          },
                          "src": "7215:23:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "&&",
                        "rightExpression": {
                          "commonType": {
                            "typeIdentifier": "t_int256",
                            "typeString": "int256"
                          },
                          "id": 6705,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "id": 6699,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 6686,
                            "src": "7242:5:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int256",
                              "typeString": "int256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "expression": {
                              "arguments": [
                                {
                                  "id": 6702,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "nodeType": "ElementaryTypeNameExpression",
                                  "src": "7256:4:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_type$_t_int8_$",
                                    "typeString": "type(int8)"
                                  },
                                  "typeName": {
                                    "id": 6701,
                                    "name": "int8",
                                    "nodeType": "ElementaryTypeName",
                                    "src": "7256:4:36",
                                    "typeDescriptions": {}
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_type$_t_int8_$",
                                    "typeString": "type(int8)"
                                  }
                                ],
                                "id": 6700,
                                "name": "type",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 4294967269,
                                "src": "7251:4:36",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                  "typeString": "function () pure"
                                }
                              },
                              "id": 6703,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "functionCall",
                              "lValueRequested": false,
                              "names": [],
                              "nodeType": "FunctionCall",
                              "src": "7251:10:36",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_meta_type_t_int8",
                                "typeString": "type(int8)"
                              }
                            },
                            "id": 6704,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "memberName": "max",
                            "nodeType": "MemberAccess",
                            "src": "7251:14:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_int8",
                              "typeString": "int8"
                            }
                          },
                          "src": "7242:23:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "src": "7215:50:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20382062697473",
                        "id": 6707,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7267:39:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
                        },
                        "value": "SafeCast: value doesn't fit in 8 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_2610961ba53259047cd57c60366c5ad0b8aabf5eb4132487619b736715a740d1",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in 8 bits\""
                        }
                      ],
                      "id": 6691,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "7207:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6708,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7207:100:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6709,
                  "nodeType": "ExpressionStatement",
                  "src": "7207:100:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6712,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6686,
                        "src": "7329:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_int256",
                          "typeString": "int256"
                        }
                      ],
                      "id": 6711,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "7324:4:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int8_$",
                        "typeString": "type(int8)"
                      },
                      "typeName": {
                        "id": 6710,
                        "name": "int8",
                        "nodeType": "ElementaryTypeName",
                        "src": "7324:4:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6713,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7324:11:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int8",
                      "typeString": "int8"
                    }
                  },
                  "functionReturnParameters": 6690,
                  "id": 6714,
                  "nodeType": "Return",
                  "src": "7317:18:36"
                }
              ]
            },
            "documentation": {
              "id": 6684,
              "nodeType": "StructuredDocumentation",
              "src": "6792:341:36",
              "text": " @dev Returns the downcasted int8 from int256, reverting on\n overflow (when the input is less than smallest int8 or\n greater than largest int8).\n Counterpart to Solidity's `int8` operator.\n Requirements:\n - input must fit into 8 bits.\n _Available since v3.1._"
            },
            "id": 6716,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt8",
            "nameLocation": "7147:6:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6687,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6686,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "7161:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6716,
                  "src": "7154:12:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6685,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7154:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7153:14:36"
            },
            "returnParameters": {
              "id": 6690,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6689,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6716,
                  "src": "7191:4:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int8",
                    "typeString": "int8"
                  },
                  "typeName": {
                    "id": 6688,
                    "name": "int8",
                    "nodeType": "ElementaryTypeName",
                    "src": "7191:4:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int8",
                      "typeString": "int8"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7190:6:36"
            },
            "scope": 6745,
            "src": "7138:204:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 6743,
              "nodeType": "Block",
              "src": "7582:233:36",
              "statements": [
                {
                  "expression": {
                    "arguments": [
                      {
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 6734,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "id": 6725,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 6719,
                          "src": "7699:5:36",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<=",
                        "rightExpression": {
                          "arguments": [
                            {
                              "expression": {
                                "arguments": [
                                  {
                                    "id": 6730,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "7721:6:36",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_int256_$",
                                      "typeString": "type(int256)"
                                    },
                                    "typeName": {
                                      "id": 6729,
                                      "name": "int256",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "7721:6:36",
                                      "typeDescriptions": {}
                                    }
                                  }
                                ],
                                "expression": {
                                  "argumentTypes": [
                                    {
                                      "typeIdentifier": "t_type$_t_int256_$",
                                      "typeString": "type(int256)"
                                    }
                                  ],
                                  "id": 6728,
                                  "name": "type",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 4294967269,
                                  "src": "7716:4:36",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_function_metatype_pure$__$returns$__$",
                                    "typeString": "function () pure"
                                  }
                                },
                                "id": 6731,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "functionCall",
                                "lValueRequested": false,
                                "names": [],
                                "nodeType": "FunctionCall",
                                "src": "7716:12:36",
                                "tryCall": false,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_magic_meta_type_t_int256",
                                  "typeString": "type(int256)"
                                }
                              },
                              "id": 6732,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "memberName": "max",
                              "nodeType": "MemberAccess",
                              "src": "7716:16:36",
                              "typeDescriptions": {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_int256",
                                "typeString": "int256"
                              }
                            ],
                            "id": 6727,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "lValueRequested": false,
                            "nodeType": "ElementaryTypeNameExpression",
                            "src": "7708:7:36",
                            "typeDescriptions": {
                              "typeIdentifier": "t_type$_t_uint256_$",
                              "typeString": "type(uint256)"
                            },
                            "typeName": {
                              "id": 6726,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "7708:7:36",
                              "typeDescriptions": {}
                            }
                          },
                          "id": 6733,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "typeConversion",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "7708:25:36",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "src": "7699:34:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "hexValue": "53616665436173743a2076616c756520646f65736e27742066697420696e20616e20696e74323536",
                        "id": 6735,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "7735:42:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_d70dcf21692b3c91b4c5fbb89ed57f464aa42efbe5b0ea96c4acb7c080144227",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in an int256\""
                        },
                        "value": "SafeCast: value doesn't fit in an int256"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_d70dcf21692b3c91b4c5fbb89ed57f464aa42efbe5b0ea96c4acb7c080144227",
                          "typeString": "literal_string \"SafeCast: value doesn't fit in an int256\""
                        }
                      ],
                      "id": 6724,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        4294967278,
                        4294967278
                      ],
                      "referencedDeclaration": 4294967278,
                      "src": "7691:7:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 6736,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7691:87:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 6737,
                  "nodeType": "ExpressionStatement",
                  "src": "7691:87:36"
                },
                {
                  "expression": {
                    "arguments": [
                      {
                        "id": 6740,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 6719,
                        "src": "7802:5:36",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 6739,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "7795:6:36",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_int256_$",
                        "typeString": "type(int256)"
                      },
                      "typeName": {
                        "id": 6738,
                        "name": "int256",
                        "nodeType": "ElementaryTypeName",
                        "src": "7795:6:36",
                        "typeDescriptions": {}
                      }
                    },
                    "id": 6741,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "7795:13:36",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "functionReturnParameters": 6723,
                  "id": 6742,
                  "nodeType": "Return",
                  "src": "7788:20:36"
                }
              ]
            },
            "documentation": {
              "id": 6717,
              "nodeType": "StructuredDocumentation",
              "src": "7348:165:36",
              "text": " @dev Converts an unsigned uint256 into a signed int256.\n Requirements:\n - input must be less than or equal to maxInt256."
            },
            "id": 6744,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toInt256",
            "nameLocation": "7527:8:36",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6720,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6719,
                  "mutability": "mutable",
                  "name": "value",
                  "nameLocation": "7544:5:36",
                  "nodeType": "VariableDeclaration",
                  "scope": 6744,
                  "src": "7536:13:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6718,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7536:7:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7535:15:36"
            },
            "returnParameters": {
              "id": 6723,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6722,
                  "mutability": "mutable",
                  "name": "",
                  "nameLocation": "-1:-1:-1",
                  "nodeType": "VariableDeclaration",
                  "scope": 6744,
                  "src": "7574:6:36",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_int256",
                    "typeString": "int256"
                  },
                  "typeName": {
                    "id": 6721,
                    "name": "int256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7574:6:36",
                    "typeDescriptions": {
                      "typeIdentifier": "t_int256",
                      "typeString": "int256"
                    }
                  },
                  "visibility": "internal"
                }
              ],
              "src": "7573:8:36"
            },
            "scope": 6745,
            "src": "7518:297:36",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 6746,
        "src": "827:6990:36",
        "usedErrors": []
      }
    ],
    "src": "92:7726:36"
  },
  "compiler": {
    "name": "solc",
    "version": "0.8.11+commit.d7f03943.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.4",
  "updatedAt": "2022-03-06T23:47:11.070Z",
  "devdoc": {
    "details": "Wrappers over Solidity's uintXX/intXX casting operators with added overflow checks. Downcasting from uint256/int256 in Solidity does not revert on overflow. This can easily result in undesired exploitation or bugs, since developers usually assume that overflows raise errors. `SafeCast` restores this intuition by reverting the transaction when such an operation overflows. Using this library instead of the unchecked operations eliminates an entire class of bugs, so it's recommended to use it always. Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing all math on `uint256` and `int256` and then downcasting.",
    "kind": "dev",
    "methods": {},
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  }
}