{
  "contractName": "SafeCast",
  "abi": [],
  "metadata": "{\"compiler\":{\"version\":\"0.6.12+commit.27d51765\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/utils/SafeCast.sol\":\"SafeCast\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/utils/SafeCast.sol\":{\"keccak256\":\"0x07a3b86654f9e1a2d49822e82c7b98b8fe68767c21968c95951079c3048e82dc\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://21e7bc82101b94d832601e5e2707e25ed93e788e1a363196221748090aafbf30\",\"dweb:/ipfs/QmWcjBuFMXvGsicL3DgegAR6BEt7HnuN9SbSSUHEFWzybk\"]}},\"version\":1}",
  "bytecode": "0x60566023600b82828239805160001a607314601657fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122089fe74f51303a50e5390a734abf0a0a97c2bd2a6af95d77e843c6f4bc608266a64736f6c634300060c0033",
  "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea264697066735822122089fe74f51303a50e5390a734abf0a0a97c2bd2a6af95d77e843c6f4bc608266a64736f6c634300060c0033",
  "immutableReferences": {},
  "sourceMap": "59:712:55:-:0;;;;;;;;;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "59:712:55:-:0;;;;;;;;",
  "source": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.6.12;\n\n\nlibrary SafeCast {\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        require(value < 2**200, \"value does not fit in 200 bits\");\n        return uint200(value);\n    }\n\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        require(value < 2**128, \"value does not fit in 128 bits\");\n        return uint128(value);\n    }\n\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        require(value < 2**40, \"value does not fit in 40 bits\");\n        return uint40(value);\n    }\n\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        require(value < 2**8, \"value does not fit in 8 bits\");\n        return uint8(value);\n    }\n}\n",
  "sourcePath": "/home/sigo/w/deer/ethsub/packages/sol/contracts/utils/SafeCast.sol",
  "ast": {
    "absolutePath": "project:/contracts/utils/SafeCast.sol",
    "exportedSymbols": {
      "SafeCast": [
        10341
      ]
    },
    "id": 10342,
    "license": "MIT",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 10252,
        "literals": [
          "solidity",
          "0.6",
          ".12"
        ],
        "nodeType": "PragmaDirective",
        "src": "33:23:55"
      },
      {
        "abstract": false,
        "baseContracts": [],
        "contractDependencies": [],
        "contractKind": "library",
        "documentation": null,
        "fullyImplemented": true,
        "id": 10341,
        "linearizedBaseContracts": [
          10341
        ],
        "name": "SafeCast",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 10273,
              "nodeType": "Block",
              "src": "148:105:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 10264,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 10260,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10254,
                          "src": "166:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_rational_1606938044258990275541962092341162602522202993782792835301376_by_1",
                            "typeString": "int_const 1606...(53 digits omitted)...1376"
                          },
                          "id": 10263,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "hexValue": "32",
                            "id": 10261,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "174:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "**",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "323030",
                            "id": 10262,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "177:3:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_200_by_1",
                              "typeString": "int_const 200"
                            },
                            "value": "200"
                          },
                          "src": "174:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1606938044258990275541962092341162602522202993782792835301376_by_1",
                            "typeString": "int_const 1606...(53 digits omitted)...1376"
                          }
                        },
                        "src": "166:14:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "76616c756520646f6573206e6f742066697420696e203230302062697473",
                        "id": 10265,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "182:32:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_59e58ae7ab3a9ae814ea92465aea9521d3ac4a895bb563eae0a7e315c9c1e429",
                          "typeString": "literal_string \"value does not fit in 200 bits\""
                        },
                        "value": "value does not fit in 200 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_59e58ae7ab3a9ae814ea92465aea9521d3ac4a895bb563eae0a7e315c9c1e429",
                          "typeString": "literal_string \"value does not fit in 200 bits\""
                        }
                      ],
                      "id": 10259,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "158:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 10266,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "158:57:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 10267,
                  "nodeType": "ExpressionStatement",
                  "src": "158:57:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 10270,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10254,
                        "src": "240:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 10269,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "232:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint200_$",
                        "typeString": "type(uint200)"
                      },
                      "typeName": {
                        "id": 10268,
                        "name": "uint200",
                        "nodeType": "ElementaryTypeName",
                        "src": "232:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": null,
                          "typeString": null
                        }
                      }
                    },
                    "id": 10271,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "232:14:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint200",
                      "typeString": "uint200"
                    }
                  },
                  "functionReturnParameters": 10258,
                  "id": 10272,
                  "nodeType": "Return",
                  "src": "225:21:55"
                }
              ]
            },
            "documentation": null,
            "id": 10274,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint200",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 10255,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10254,
                  "mutability": "mutable",
                  "name": "value",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 10274,
                  "src": "101:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10253,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "101:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "100:15:55"
            },
            "returnParameters": {
              "id": 10258,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10257,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 10274,
                  "src": "139:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint200",
                    "typeString": "uint200"
                  },
                  "typeName": {
                    "id": 10256,
                    "name": "uint200",
                    "nodeType": "ElementaryTypeName",
                    "src": "139:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint200",
                      "typeString": "uint200"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "138:9:55"
            },
            "scope": 10341,
            "src": "82:171:55",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 10295,
              "nodeType": "Block",
              "src": "325:105:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 10286,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 10282,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10276,
                          "src": "343:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1",
                            "typeString": "int_const 3402...(31 digits omitted)...1456"
                          },
                          "id": 10285,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "hexValue": "32",
                            "id": 10283,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "351:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "**",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "313238",
                            "id": 10284,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "354:3:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_128_by_1",
                              "typeString": "int_const 128"
                            },
                            "value": "128"
                          },
                          "src": "351:6:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1",
                            "typeString": "int_const 3402...(31 digits omitted)...1456"
                          }
                        },
                        "src": "343:14:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "76616c756520646f6573206e6f742066697420696e203132382062697473",
                        "id": 10287,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "359:32:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_151f3206c4f8ae714f4c8ff188c59ccf82367a7eb9996fd244eb22e73a441b52",
                          "typeString": "literal_string \"value does not fit in 128 bits\""
                        },
                        "value": "value does not fit in 128 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_151f3206c4f8ae714f4c8ff188c59ccf82367a7eb9996fd244eb22e73a441b52",
                          "typeString": "literal_string \"value does not fit in 128 bits\""
                        }
                      ],
                      "id": 10281,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "335:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 10288,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "335:57:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 10289,
                  "nodeType": "ExpressionStatement",
                  "src": "335:57:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 10292,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10276,
                        "src": "417:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 10291,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "409:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint128_$",
                        "typeString": "type(uint128)"
                      },
                      "typeName": {
                        "id": 10290,
                        "name": "uint128",
                        "nodeType": "ElementaryTypeName",
                        "src": "409:7:55",
                        "typeDescriptions": {
                          "typeIdentifier": null,
                          "typeString": null
                        }
                      }
                    },
                    "id": 10293,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "409:14:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "functionReturnParameters": 10280,
                  "id": 10294,
                  "nodeType": "Return",
                  "src": "402:21:55"
                }
              ]
            },
            "documentation": null,
            "id": 10296,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint128",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 10277,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10276,
                  "mutability": "mutable",
                  "name": "value",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 10296,
                  "src": "278:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10275,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "278:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "277:15:55"
            },
            "returnParameters": {
              "id": 10280,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10279,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 10296,
                  "src": "316:7:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint128",
                    "typeString": "uint128"
                  },
                  "typeName": {
                    "id": 10278,
                    "name": "uint128",
                    "nodeType": "ElementaryTypeName",
                    "src": "316:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint128",
                      "typeString": "uint128"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "315:9:55"
            },
            "scope": 10341,
            "src": "259:171:55",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 10317,
              "nodeType": "Block",
              "src": "500:102:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 10308,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 10304,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10298,
                          "src": "518:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_rational_1099511627776_by_1",
                            "typeString": "int_const 1099511627776"
                          },
                          "id": 10307,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "hexValue": "32",
                            "id": 10305,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "526:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "**",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "3430",
                            "id": 10306,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "529:2:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_40_by_1",
                              "typeString": "int_const 40"
                            },
                            "value": "40"
                          },
                          "src": "526:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_1099511627776_by_1",
                            "typeString": "int_const 1099511627776"
                          }
                        },
                        "src": "518:13:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "76616c756520646f6573206e6f742066697420696e2034302062697473",
                        "id": 10309,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "533:31:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_172700490614e4dfe732cc281f73d181a1bd9e8d7b31c8a03ff282ea9d3cc656",
                          "typeString": "literal_string \"value does not fit in 40 bits\""
                        },
                        "value": "value does not fit in 40 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_172700490614e4dfe732cc281f73d181a1bd9e8d7b31c8a03ff282ea9d3cc656",
                          "typeString": "literal_string \"value does not fit in 40 bits\""
                        }
                      ],
                      "id": 10303,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "510:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 10310,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "510:55:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 10311,
                  "nodeType": "ExpressionStatement",
                  "src": "510:55:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 10314,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10298,
                        "src": "589:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 10313,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "582:6:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint40_$",
                        "typeString": "type(uint40)"
                      },
                      "typeName": {
                        "id": 10312,
                        "name": "uint40",
                        "nodeType": "ElementaryTypeName",
                        "src": "582:6:55",
                        "typeDescriptions": {
                          "typeIdentifier": null,
                          "typeString": null
                        }
                      }
                    },
                    "id": 10315,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "582:13:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint40",
                      "typeString": "uint40"
                    }
                  },
                  "functionReturnParameters": 10302,
                  "id": 10316,
                  "nodeType": "Return",
                  "src": "575:20:55"
                }
              ]
            },
            "documentation": null,
            "id": 10318,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint40",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 10299,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10298,
                  "mutability": "mutable",
                  "name": "value",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 10318,
                  "src": "454:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10297,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "454:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "453:15:55"
            },
            "returnParameters": {
              "id": 10302,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10301,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 10318,
                  "src": "492:6:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint40",
                    "typeString": "uint40"
                  },
                  "typeName": {
                    "id": 10300,
                    "name": "uint40",
                    "nodeType": "ElementaryTypeName",
                    "src": "492:6:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint40",
                      "typeString": "uint40"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "491:8:55"
            },
            "scope": 10341,
            "src": "436:166:55",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 10339,
              "nodeType": "Block",
              "src": "670:99:55",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "commonType": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        },
                        "id": 10330,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "leftExpression": {
                          "argumentTypes": null,
                          "id": 10326,
                          "name": "value",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 10320,
                          "src": "688:5:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "BinaryOperation",
                        "operator": "<",
                        "rightExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_rational_256_by_1",
                            "typeString": "int_const 256"
                          },
                          "id": 10329,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "hexValue": "32",
                            "id": 10327,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "696:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "**",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "38",
                            "id": 10328,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "699:1:55",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_8_by_1",
                              "typeString": "int_const 8"
                            },
                            "value": "8"
                          },
                          "src": "696:4:55",
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_256_by_1",
                            "typeString": "int_const 256"
                          }
                        },
                        "src": "688:12:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        }
                      },
                      {
                        "argumentTypes": null,
                        "hexValue": "76616c756520646f6573206e6f742066697420696e20382062697473",
                        "id": 10331,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "string",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "702:30:55",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_stringliteral_4e9c69b01191ff3a3d7ad79085f3da33cdc24596180720b08161130c17fa0258",
                          "typeString": "literal_string \"value does not fit in 8 bits\""
                        },
                        "value": "value does not fit in 8 bits"
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_bool",
                          "typeString": "bool"
                        },
                        {
                          "typeIdentifier": "t_stringliteral_4e9c69b01191ff3a3d7ad79085f3da33cdc24596180720b08161130c17fa0258",
                          "typeString": "literal_string \"value does not fit in 8 bits\""
                        }
                      ],
                      "id": 10325,
                      "name": "require",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [
                        -18,
                        -18
                      ],
                      "referencedDeclaration": -18,
                      "src": "680:7:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                        "typeString": "function (bool,string memory) pure"
                      }
                    },
                    "id": 10332,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "functionCall",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "680:53:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_tuple$__$",
                      "typeString": "tuple()"
                    }
                  },
                  "id": 10333,
                  "nodeType": "ExpressionStatement",
                  "src": "680:53:55"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "arguments": [
                      {
                        "argumentTypes": null,
                        "id": 10336,
                        "name": "value",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10320,
                        "src": "756:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      }
                    ],
                    "expression": {
                      "argumentTypes": [
                        {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      ],
                      "id": 10335,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "lValueRequested": false,
                      "nodeType": "ElementaryTypeNameExpression",
                      "src": "750:5:55",
                      "typeDescriptions": {
                        "typeIdentifier": "t_type$_t_uint8_$",
                        "typeString": "type(uint8)"
                      },
                      "typeName": {
                        "id": 10334,
                        "name": "uint8",
                        "nodeType": "ElementaryTypeName",
                        "src": "750:5:55",
                        "typeDescriptions": {
                          "typeIdentifier": null,
                          "typeString": null
                        }
                      }
                    },
                    "id": 10337,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "kind": "typeConversion",
                    "lValueRequested": false,
                    "names": [],
                    "nodeType": "FunctionCall",
                    "src": "750:12:55",
                    "tryCall": false,
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "functionReturnParameters": 10324,
                  "id": 10338,
                  "nodeType": "Return",
                  "src": "743:19:55"
                }
              ]
            },
            "documentation": null,
            "id": 10340,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "toUint8",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 10321,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10320,
                  "mutability": "mutable",
                  "name": "value",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 10340,
                  "src": "625:13:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10319,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "625:7:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "624:15:55"
            },
            "returnParameters": {
              "id": 10324,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10323,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 10340,
                  "src": "663:5:55",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint8",
                    "typeString": "uint8"
                  },
                  "typeName": {
                    "id": 10322,
                    "name": "uint8",
                    "nodeType": "ElementaryTypeName",
                    "src": "663:5:55",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint8",
                      "typeString": "uint8"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "662:7:55"
            },
            "scope": 10341,
            "src": "608:161:55",
            "stateMutability": "pure",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 10342,
        "src": "59:712:55"
      }
    ],
    "src": "33:739:55"
  },
  "legacyAST": {
    "attributes": {
      "absolutePath": "project:/contracts/utils/SafeCast.sol",
      "exportedSymbols": {
        "SafeCast": [
          10341
        ]
      },
      "license": "MIT"
    },
    "children": [
      {
        "attributes": {
          "literals": [
            "solidity",
            "0.6",
            ".12"
          ]
        },
        "id": 10252,
        "name": "PragmaDirective",
        "src": "33:23:55"
      },
      {
        "attributes": {
          "abstract": false,
          "baseContracts": [
            null
          ],
          "contractDependencies": [
            null
          ],
          "contractKind": "library",
          "documentation": null,
          "fullyImplemented": true,
          "linearizedBaseContracts": [
            10341
          ],
          "name": "SafeCast",
          "scope": 10342
        },
        "children": [
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "toUint200",
              "overrides": null,
              "scope": 10341,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "value",
                      "overrides": null,
                      "scope": 10274,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 10253,
                        "name": "ElementaryTypeName",
                        "src": "101:7:55"
                      }
                    ],
                    "id": 10254,
                    "name": "VariableDeclaration",
                    "src": "101:13:55"
                  }
                ],
                "id": 10255,
                "name": "ParameterList",
                "src": "100:15:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "overrides": null,
                      "scope": 10274,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint200",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint200",
                          "type": "uint200"
                        },
                        "id": 10256,
                        "name": "ElementaryTypeName",
                        "src": "139:7:55"
                      }
                    ],
                    "id": 10257,
                    "name": "VariableDeclaration",
                    "src": "139:7:55"
                  }
                ],
                "id": 10258,
                "name": "ParameterList",
                "src": "138:9:55"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_59e58ae7ab3a9ae814ea92465aea9521d3ac4a895bb563eae0a7e315c9c1e429",
                                  "typeString": "literal_string \"value does not fit in 200 bits\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 10259,
                            "name": "Identifier",
                            "src": "158:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "<",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 10254,
                                  "type": "uint256",
                                  "value": "value"
                                },
                                "id": 10260,
                                "name": "Identifier",
                                "src": "166:5:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_rational_1606938044258990275541962092341162602522202993782792835301376_by_1",
                                    "typeString": "int_const 1606...(53 digits omitted)...1376"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "operator": "**",
                                  "type": "int_const 1606...(53 digits omitted)...1376"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2",
                                      "value": "2"
                                    },
                                    "id": 10261,
                                    "name": "Literal",
                                    "src": "174:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "323030",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 200",
                                      "value": "200"
                                    },
                                    "id": 10262,
                                    "name": "Literal",
                                    "src": "177:3:55"
                                  }
                                ],
                                "id": 10263,
                                "name": "BinaryOperation",
                                "src": "174:6:55"
                              }
                            ],
                            "id": 10264,
                            "name": "BinaryOperation",
                            "src": "166:14:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "76616c756520646f6573206e6f742066697420696e203230302062697473",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"value does not fit in 200 bits\"",
                              "value": "value does not fit in 200 bits"
                            },
                            "id": 10265,
                            "name": "Literal",
                            "src": "182:32:55"
                          }
                        ],
                        "id": 10266,
                        "name": "FunctionCall",
                        "src": "158:57:55"
                      }
                    ],
                    "id": 10267,
                    "name": "ExpressionStatement",
                    "src": "158:57:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 10258
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint200",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "type": "type(uint200)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint200",
                                  "type": null
                                },
                                "id": 10268,
                                "name": "ElementaryTypeName",
                                "src": "232:7:55"
                              }
                            ],
                            "id": 10269,
                            "name": "ElementaryTypeNameExpression",
                            "src": "232:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 10254,
                              "type": "uint256",
                              "value": "value"
                            },
                            "id": 10270,
                            "name": "Identifier",
                            "src": "240:5:55"
                          }
                        ],
                        "id": 10271,
                        "name": "FunctionCall",
                        "src": "232:14:55"
                      }
                    ],
                    "id": 10272,
                    "name": "Return",
                    "src": "225:21:55"
                  }
                ],
                "id": 10273,
                "name": "Block",
                "src": "148:105:55"
              }
            ],
            "id": 10274,
            "name": "FunctionDefinition",
            "src": "82:171:55"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "toUint128",
              "overrides": null,
              "scope": 10341,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "value",
                      "overrides": null,
                      "scope": 10296,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 10275,
                        "name": "ElementaryTypeName",
                        "src": "278:7:55"
                      }
                    ],
                    "id": 10276,
                    "name": "VariableDeclaration",
                    "src": "278:13:55"
                  }
                ],
                "id": 10277,
                "name": "ParameterList",
                "src": "277:15:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "overrides": null,
                      "scope": 10296,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint128",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint128",
                          "type": "uint128"
                        },
                        "id": 10278,
                        "name": "ElementaryTypeName",
                        "src": "316:7:55"
                      }
                    ],
                    "id": 10279,
                    "name": "VariableDeclaration",
                    "src": "316:7:55"
                  }
                ],
                "id": 10280,
                "name": "ParameterList",
                "src": "315:9:55"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_151f3206c4f8ae714f4c8ff188c59ccf82367a7eb9996fd244eb22e73a441b52",
                                  "typeString": "literal_string \"value does not fit in 128 bits\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 10281,
                            "name": "Identifier",
                            "src": "335:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "<",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 10276,
                                  "type": "uint256",
                                  "value": "value"
                                },
                                "id": 10282,
                                "name": "Identifier",
                                "src": "343:5:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_rational_340282366920938463463374607431768211456_by_1",
                                    "typeString": "int_const 3402...(31 digits omitted)...1456"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "operator": "**",
                                  "type": "int_const 3402...(31 digits omitted)...1456"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2",
                                      "value": "2"
                                    },
                                    "id": 10283,
                                    "name": "Literal",
                                    "src": "351:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "313238",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 128",
                                      "value": "128"
                                    },
                                    "id": 10284,
                                    "name": "Literal",
                                    "src": "354:3:55"
                                  }
                                ],
                                "id": 10285,
                                "name": "BinaryOperation",
                                "src": "351:6:55"
                              }
                            ],
                            "id": 10286,
                            "name": "BinaryOperation",
                            "src": "343:14:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "76616c756520646f6573206e6f742066697420696e203132382062697473",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"value does not fit in 128 bits\"",
                              "value": "value does not fit in 128 bits"
                            },
                            "id": 10287,
                            "name": "Literal",
                            "src": "359:32:55"
                          }
                        ],
                        "id": 10288,
                        "name": "FunctionCall",
                        "src": "335:57:55"
                      }
                    ],
                    "id": 10289,
                    "name": "ExpressionStatement",
                    "src": "335:57:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 10280
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint128",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "type": "type(uint128)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint128",
                                  "type": null
                                },
                                "id": 10290,
                                "name": "ElementaryTypeName",
                                "src": "409:7:55"
                              }
                            ],
                            "id": 10291,
                            "name": "ElementaryTypeNameExpression",
                            "src": "409:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 10276,
                              "type": "uint256",
                              "value": "value"
                            },
                            "id": 10292,
                            "name": "Identifier",
                            "src": "417:5:55"
                          }
                        ],
                        "id": 10293,
                        "name": "FunctionCall",
                        "src": "409:14:55"
                      }
                    ],
                    "id": 10294,
                    "name": "Return",
                    "src": "402:21:55"
                  }
                ],
                "id": 10295,
                "name": "Block",
                "src": "325:105:55"
              }
            ],
            "id": 10296,
            "name": "FunctionDefinition",
            "src": "259:171:55"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "toUint40",
              "overrides": null,
              "scope": 10341,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "value",
                      "overrides": null,
                      "scope": 10318,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 10297,
                        "name": "ElementaryTypeName",
                        "src": "454:7:55"
                      }
                    ],
                    "id": 10298,
                    "name": "VariableDeclaration",
                    "src": "454:13:55"
                  }
                ],
                "id": 10299,
                "name": "ParameterList",
                "src": "453:15:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "overrides": null,
                      "scope": 10318,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint40",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint40",
                          "type": "uint40"
                        },
                        "id": 10300,
                        "name": "ElementaryTypeName",
                        "src": "492:6:55"
                      }
                    ],
                    "id": 10301,
                    "name": "VariableDeclaration",
                    "src": "492:6:55"
                  }
                ],
                "id": 10302,
                "name": "ParameterList",
                "src": "491:8:55"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_172700490614e4dfe732cc281f73d181a1bd9e8d7b31c8a03ff282ea9d3cc656",
                                  "typeString": "literal_string \"value does not fit in 40 bits\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 10303,
                            "name": "Identifier",
                            "src": "510:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "<",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 10298,
                                  "type": "uint256",
                                  "value": "value"
                                },
                                "id": 10304,
                                "name": "Identifier",
                                "src": "518:5:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_rational_1099511627776_by_1",
                                    "typeString": "int_const 1099511627776"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "operator": "**",
                                  "type": "int_const 1099511627776"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2",
                                      "value": "2"
                                    },
                                    "id": 10305,
                                    "name": "Literal",
                                    "src": "526:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "3430",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 40",
                                      "value": "40"
                                    },
                                    "id": 10306,
                                    "name": "Literal",
                                    "src": "529:2:55"
                                  }
                                ],
                                "id": 10307,
                                "name": "BinaryOperation",
                                "src": "526:5:55"
                              }
                            ],
                            "id": 10308,
                            "name": "BinaryOperation",
                            "src": "518:13:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "76616c756520646f6573206e6f742066697420696e2034302062697473",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"value does not fit in 40 bits\"",
                              "value": "value does not fit in 40 bits"
                            },
                            "id": 10309,
                            "name": "Literal",
                            "src": "533:31:55"
                          }
                        ],
                        "id": 10310,
                        "name": "FunctionCall",
                        "src": "510:55:55"
                      }
                    ],
                    "id": 10311,
                    "name": "ExpressionStatement",
                    "src": "510:55:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 10302
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint40",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "type": "type(uint40)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint40",
                                  "type": null
                                },
                                "id": 10312,
                                "name": "ElementaryTypeName",
                                "src": "582:6:55"
                              }
                            ],
                            "id": 10313,
                            "name": "ElementaryTypeNameExpression",
                            "src": "582:6:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 10298,
                              "type": "uint256",
                              "value": "value"
                            },
                            "id": 10314,
                            "name": "Identifier",
                            "src": "589:5:55"
                          }
                        ],
                        "id": 10315,
                        "name": "FunctionCall",
                        "src": "582:13:55"
                      }
                    ],
                    "id": 10316,
                    "name": "Return",
                    "src": "575:20:55"
                  }
                ],
                "id": 10317,
                "name": "Block",
                "src": "500:102:55"
              }
            ],
            "id": 10318,
            "name": "FunctionDefinition",
            "src": "436:166:55"
          },
          {
            "attributes": {
              "documentation": null,
              "implemented": true,
              "isConstructor": false,
              "kind": "function",
              "modifiers": [
                null
              ],
              "name": "toUint8",
              "overrides": null,
              "scope": 10341,
              "stateMutability": "pure",
              "virtual": false,
              "visibility": "internal"
            },
            "children": [
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "value",
                      "overrides": null,
                      "scope": 10340,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint256",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint256",
                          "type": "uint256"
                        },
                        "id": 10319,
                        "name": "ElementaryTypeName",
                        "src": "625:7:55"
                      }
                    ],
                    "id": 10320,
                    "name": "VariableDeclaration",
                    "src": "625:13:55"
                  }
                ],
                "id": 10321,
                "name": "ParameterList",
                "src": "624:15:55"
              },
              {
                "children": [
                  {
                    "attributes": {
                      "constant": false,
                      "mutability": "mutable",
                      "name": "",
                      "overrides": null,
                      "scope": 10340,
                      "stateVariable": false,
                      "storageLocation": "default",
                      "type": "uint8",
                      "value": null,
                      "visibility": "internal"
                    },
                    "children": [
                      {
                        "attributes": {
                          "name": "uint8",
                          "type": "uint8"
                        },
                        "id": 10322,
                        "name": "ElementaryTypeName",
                        "src": "663:5:55"
                      }
                    ],
                    "id": 10323,
                    "name": "VariableDeclaration",
                    "src": "663:5:55"
                  }
                ],
                "id": 10324,
                "name": "ParameterList",
                "src": "662:7:55"
              },
              {
                "children": [
                  {
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "tuple()",
                          "type_conversion": false
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_bool",
                                  "typeString": "bool"
                                },
                                {
                                  "typeIdentifier": "t_stringliteral_4e9c69b01191ff3a3d7ad79085f3da33cdc24596180720b08161130c17fa0258",
                                  "typeString": "literal_string \"value does not fit in 8 bits\""
                                }
                              ],
                              "overloadedDeclarations": [
                                -18,
                                -18
                              ],
                              "referencedDeclaration": -18,
                              "type": "function (bool,string memory) pure",
                              "value": "require"
                            },
                            "id": 10325,
                            "name": "Identifier",
                            "src": "680:7:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "operator": "<",
                              "type": "bool"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "overloadedDeclarations": [
                                    null
                                  ],
                                  "referencedDeclaration": 10320,
                                  "type": "uint256",
                                  "value": "value"
                                },
                                "id": 10326,
                                "name": "Identifier",
                                "src": "688:5:55"
                              },
                              {
                                "attributes": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_rational_256_by_1",
                                    "typeString": "int_const 256"
                                  },
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "lValueRequested": false,
                                  "operator": "**",
                                  "type": "int_const 256"
                                },
                                "children": [
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "32",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 2",
                                      "value": "2"
                                    },
                                    "id": 10327,
                                    "name": "Literal",
                                    "src": "696:1:55"
                                  },
                                  {
                                    "attributes": {
                                      "argumentTypes": null,
                                      "hexvalue": "38",
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": true,
                                      "lValueRequested": false,
                                      "subdenomination": null,
                                      "token": "number",
                                      "type": "int_const 8",
                                      "value": "8"
                                    },
                                    "id": 10328,
                                    "name": "Literal",
                                    "src": "699:1:55"
                                  }
                                ],
                                "id": 10329,
                                "name": "BinaryOperation",
                                "src": "696:4:55"
                              }
                            ],
                            "id": 10330,
                            "name": "BinaryOperation",
                            "src": "688:12:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "hexvalue": "76616c756520646f6573206e6f742066697420696e20382062697473",
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "subdenomination": null,
                              "token": "string",
                              "type": "literal_string \"value does not fit in 8 bits\"",
                              "value": "value does not fit in 8 bits"
                            },
                            "id": 10331,
                            "name": "Literal",
                            "src": "702:30:55"
                          }
                        ],
                        "id": 10332,
                        "name": "FunctionCall",
                        "src": "680:53:55"
                      }
                    ],
                    "id": 10333,
                    "name": "ExpressionStatement",
                    "src": "680:53:55"
                  },
                  {
                    "attributes": {
                      "functionReturnParameters": 10324
                    },
                    "children": [
                      {
                        "attributes": {
                          "argumentTypes": null,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "isStructConstructorCall": false,
                          "lValueRequested": false,
                          "names": [
                            null
                          ],
                          "tryCall": false,
                          "type": "uint8",
                          "type_conversion": true
                        },
                        "children": [
                          {
                            "attributes": {
                              "argumentTypes": [
                                {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              ],
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "lValueRequested": false,
                              "type": "type(uint8)"
                            },
                            "children": [
                              {
                                "attributes": {
                                  "name": "uint8",
                                  "type": null
                                },
                                "id": 10334,
                                "name": "ElementaryTypeName",
                                "src": "750:5:55"
                              }
                            ],
                            "id": 10335,
                            "name": "ElementaryTypeNameExpression",
                            "src": "750:5:55"
                          },
                          {
                            "attributes": {
                              "argumentTypes": null,
                              "overloadedDeclarations": [
                                null
                              ],
                              "referencedDeclaration": 10320,
                              "type": "uint256",
                              "value": "value"
                            },
                            "id": 10336,
                            "name": "Identifier",
                            "src": "756:5:55"
                          }
                        ],
                        "id": 10337,
                        "name": "FunctionCall",
                        "src": "750:12:55"
                      }
                    ],
                    "id": 10338,
                    "name": "Return",
                    "src": "743:19:55"
                  }
                ],
                "id": 10339,
                "name": "Block",
                "src": "670:99:55"
              }
            ],
            "id": 10340,
            "name": "FunctionDefinition",
            "src": "608:161:55"
          }
        ],
        "id": 10341,
        "name": "ContractDefinition",
        "src": "59:712:55"
      }
    ],
    "id": 10342,
    "name": "SourceUnit",
    "src": "33:739:55"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.12+commit.27d51765.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.4.3",
  "updatedAt": "2021-11-29T02:07:34.278Z",
  "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  }
}