{
  "contractName": "Checkpoint",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "checkpointId",
          "type": "uint256"
        }
      ],
      "name": "CheckpointCreated",
      "type": "event"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.6.11+commit.5ef660b1\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"checkpointId\",\"type\":\"uint256\"}],\"name\":\"CheckpointCreated\",\"type\":\"event\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/ICT/Checkpoint/Checkpoint.sol\":\"Checkpoint\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/ICT/Checkpoint/Checkpoint.sol\":{\"keccak256\":\"0xece3763697d7adc64207d921125eefa45f1ecf0e66d372a985efa5279b16e7bb\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://d5a3fdc8bd568e92f6f0c8f46bc2e3727911e580f9d3f3625b01af5ef8913710\",\"dweb:/ipfs/QmXXSt5oq8oxYXVHeXGnawCUDgQ1cA7zhsbz4VDYd6FnFN\"]},\"/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/ICT/Checkpoint/CheckpointStorage.sol\":{\"keccak256\":\"0x7e5c553e1ff9d469c2f732f34ea25fa709e2711ff2e2259ff1472bb89208e558\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://4c2f3706e10d710c658700fc26a7be1ee31b2a982f1f7856e559f3b5ca088ea6\",\"dweb:/ipfs/QmTcuAa1M8BqVBKaKubrf7RunMC99uzmmKK1YRWqNFwnpY\"]}},\"version\":1}",
  "bytecode": "0x6080604052348015600f57600080fd5b50603f80601d6000396000f3fe6080604052600080fdfea2646970667358221220c4411ee59d19ed3e9b40820ad3871432cf2f5aaf51f13b5f83162f94313a7c3564736f6c634300060b0033",
  "deployedBytecode": "0x6080604052600080fdfea2646970667358221220c4411ee59d19ed3e9b40820ad3871432cf2f5aaf51f13b5f83162f94313a7c3564736f6c634300060b0033",
  "immutableReferences": {},
  "sourceMap": "136:2426:58:-:0;;;;;;;;;;;;;;;;;;;",
  "deployedSourceMap": "136:2426:58:-:0;;;;;",
  "source": "// \"SPDX-License-Identifier: Apache-2.0\"\npragma solidity 0.6.11;\npragma experimental ABIEncoderV2;\n\nimport \"./CheckpointStorage.sol\";\n\n\ncontract Checkpoint is CheckpointStorage {\n\n    // Emit when new checkpoint created\n    event CheckpointCreated(uint256 indexed checkpointId);\n\n    /**\n     * @notice Queries a value at a defined checkpoint\n     * @param checkpoints array of Checkpoint objects\n     * @param timestamp timestamp to retrieve the value at\n     * @return uint256\n     */\n    function getValueAt(\n        Checkpoint[] storage checkpoints,\n        uint256 timestamp\n    ) \n        internal\n        view \n        returns (uint256)\n    {\n        // initially return 0\n        if (checkpoints.length == 0) return 0;\n\n        // Shortcut for the actual value\n        if (timestamp >= checkpoints[checkpoints.length - 1].timestamp)\n            return checkpoints[checkpoints.length - 1].value;\n        if (timestamp < checkpoints[0].timestamp) return 0;\n\n        // Binary search of the value in the array\n        uint256 min = 0;\n        uint256 max = checkpoints.length - 1;\n        while (max > min) {\n            uint256 mid = (max + min + 1) / 2;\n            if (checkpoints[mid].timestamp <= timestamp) {\n                min = mid;\n            } else {\n                max = mid - 1;\n            }\n        }\n        return checkpoints[min].value;\n    }\n\n    /**\n     * @notice Create a new checkpoint for a value if\n     * there does not exist a checkpoint for the current block timestamp,\n     * otherwise updates the value of the current checkpoint.\n     * @param checkpoints Checkpointed values\n     * @param value Value to be updated\n     */ \n    function updateValueAtNow(\n        Checkpoint[] storage checkpoints,\n        uint value\n    )\n        internal\n    {\n        // create a new checkpoint if:\n        // - there are no checkpoints\n        // - the current block has a greater timestamp than the last checkpoint\n        // otherwise update value at current checkpoint\n        if (\n            checkpoints.length == 0\n            || (block.timestamp > checkpoints[checkpoints.length - 1].timestamp)\n        ) {\n            // create checkpoint with value\n            checkpoints.push(Checkpoint({ timestamp: uint128(block.timestamp), value: value }));\n\n            emit CheckpointCreated(checkpoints.length - 1);\n            \n        } else {\n            // update value at current checkpoint\n            Checkpoint storage oldCheckPoint = checkpoints[checkpoints.length - 1];\n            oldCheckPoint.value = value;\n        }\n    }\n}",
  "sourcePath": "/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/ICT/Checkpoint/Checkpoint.sol",
  "ast": {
    "absolutePath": "/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/ICT/Checkpoint/Checkpoint.sol",
    "exportedSymbols": {
      "Checkpoint": [
        19984
      ]
    },
    "id": 19985,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 19814,
        "literals": [
          "solidity",
          "0.6",
          ".11"
        ],
        "nodeType": "PragmaDirective",
        "src": "41:23:58"
      },
      {
        "id": 19815,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "65:33:58"
      },
      {
        "absolutePath": "/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/ICT/Checkpoint/CheckpointStorage.sol",
        "file": "./CheckpointStorage.sol",
        "id": 19816,
        "nodeType": "ImportDirective",
        "scope": 19985,
        "sourceUnit": 19993,
        "src": "100:33:58",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 19817,
              "name": "CheckpointStorage",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 19992,
              "src": "159:17:58",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_CheckpointStorage_$19992",
                "typeString": "contract CheckpointStorage"
              }
            },
            "id": 19818,
            "nodeType": "InheritanceSpecifier",
            "src": "159:17:58"
          }
        ],
        "contractDependencies": [
          19992
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 19984,
        "linearizedBaseContracts": [
          19984,
          19992
        ],
        "name": "Checkpoint",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "documentation": null,
            "id": 19822,
            "name": "CheckpointCreated",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 19821,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19820,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "checkpointId",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19822,
                  "src": "248:28:58",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19819,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "248:7:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "247:30:58"
            },
            "src": "224:54:58"
          },
          {
            "body": {
              "id": 19918,
              "nodeType": "Block",
              "src": "648:719:58",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19836,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 19833,
                        "name": "checkpoints",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19826,
                        "src": "692:11:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                        }
                      },
                      "id": 19834,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "692:18:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 19835,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "714:1:58",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "692:23:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 19839,
                  "nodeType": "IfStatement",
                  "src": "688:37:58",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 19837,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "724:1:58",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "functionReturnParameters": 19832,
                    "id": 19838,
                    "nodeType": "Return",
                    "src": "717:8:58"
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19848,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 19840,
                      "name": "timestamp",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 19828,
                      "src": "781:9:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 19841,
                          "name": "checkpoints",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19826,
                          "src": "794:11:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                          }
                        },
                        "id": 19846,
                        "indexExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19845,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 19842,
                              "name": "checkpoints",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19826,
                              "src": "806:11:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                              }
                            },
                            "id": 19843,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "806:18:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 19844,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "827:1:58",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "806:22:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "794:35:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                        }
                      },
                      "id": 19847,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "timestamp",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 19988,
                      "src": "794:45:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint128",
                        "typeString": "uint128"
                      }
                    },
                    "src": "781:58:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 19857,
                  "nodeType": "IfStatement",
                  "src": "777:124:58",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 19849,
                          "name": "checkpoints",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19826,
                          "src": "860:11:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                          }
                        },
                        "id": 19854,
                        "indexExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19853,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 19850,
                              "name": "checkpoints",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19826,
                              "src": "872:11:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                              }
                            },
                            "id": 19851,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "872:18:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 19852,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "893:1:58",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "872:22:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "860:35:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                        }
                      },
                      "id": 19855,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "value",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 19990,
                      "src": "860:41:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "functionReturnParameters": 19832,
                    "id": 19856,
                    "nodeType": "Return",
                    "src": "853:48:58"
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19863,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 19858,
                      "name": "timestamp",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 19828,
                      "src": "915:9:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 19859,
                          "name": "checkpoints",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19826,
                          "src": "927:11:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                          }
                        },
                        "id": 19861,
                        "indexExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 19860,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "939:1:58",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "927:14:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                        }
                      },
                      "id": 19862,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "timestamp",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 19988,
                      "src": "927:24:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint128",
                        "typeString": "uint128"
                      }
                    },
                    "src": "915:36:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 19866,
                  "nodeType": "IfStatement",
                  "src": "911:50:58",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 19864,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "960:1:58",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "functionReturnParameters": 19832,
                    "id": 19865,
                    "nodeType": "Return",
                    "src": "953:8:58"
                  }
                },
                {
                  "assignments": [
                    19868
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 19868,
                      "mutability": "mutable",
                      "name": "min",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 19918,
                      "src": "1023:11:58",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 19867,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1023:7:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 19870,
                  "initialValue": {
                    "argumentTypes": null,
                    "hexValue": "30",
                    "id": 19869,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1037:1:58",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_0_by_1",
                      "typeString": "int_const 0"
                    },
                    "value": "0"
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1023:15:58"
                },
                {
                  "assignments": [
                    19872
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 19872,
                      "mutability": "mutable",
                      "name": "max",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 19918,
                      "src": "1048:11:58",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 19871,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1048:7:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 19877,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19876,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 19873,
                        "name": "checkpoints",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19826,
                        "src": "1062:11:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                        }
                      },
                      "id": 19874,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1062:18:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 19875,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1083:1:58",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "1062:22:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1048:36:58"
                },
                {
                  "body": {
                    "id": 19911,
                    "nodeType": "Block",
                    "src": "1112:210:58",
                    "statements": [
                      {
                        "assignments": [
                          19882
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19882,
                            "mutability": "mutable",
                            "name": "mid",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 19911,
                            "src": "1126:11:58",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 19881,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1126:7:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 19891,
                        "initialValue": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19890,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "components": [
                              {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 19887,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 19885,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 19883,
                                    "name": "max",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19872,
                                    "src": "1141:3:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "+",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 19884,
                                    "name": "min",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19868,
                                    "src": "1147:3:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "1141:9:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "31",
                                  "id": 19886,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1153:1:58",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "1141:13:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 19888,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "1140:15:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "32",
                            "id": 19889,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1158:1:58",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "src": "1140:19:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1126:33:58"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19897,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "baseExpression": {
                                "argumentTypes": null,
                                "id": 19892,
                                "name": "checkpoints",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19826,
                                "src": "1177:11:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                  "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                }
                              },
                              "id": 19894,
                              "indexExpression": {
                                "argumentTypes": null,
                                "id": 19893,
                                "name": "mid",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19882,
                                "src": "1189:3:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "1177:16:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                              }
                            },
                            "id": 19895,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19988,
                            "src": "1177:26:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint128",
                              "typeString": "uint128"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 19896,
                            "name": "timestamp",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19828,
                            "src": "1207:9:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1177:39:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 19909,
                          "nodeType": "Block",
                          "src": "1266:46:58",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 19907,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 19903,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19872,
                                  "src": "1284:3:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 19906,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 19904,
                                    "name": "mid",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19882,
                                    "src": "1290:3:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "31",
                                    "id": 19905,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1296:1:58",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "1290:7:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1284:13:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 19908,
                              "nodeType": "ExpressionStatement",
                              "src": "1284:13:58"
                            }
                          ]
                        },
                        "id": 19910,
                        "nodeType": "IfStatement",
                        "src": "1173:139:58",
                        "trueBody": {
                          "id": 19902,
                          "nodeType": "Block",
                          "src": "1218:42:58",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 19900,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 19898,
                                  "name": "min",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19868,
                                  "src": "1236:3:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "id": 19899,
                                  "name": "mid",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19882,
                                  "src": "1242:3:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1236:9:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 19901,
                              "nodeType": "ExpressionStatement",
                              "src": "1236:9:58"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19880,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 19878,
                      "name": "max",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 19872,
                      "src": "1101:3:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 19879,
                      "name": "min",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 19868,
                      "src": "1107:3:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1101:9:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 19912,
                  "nodeType": "WhileStatement",
                  "src": "1094:228:58"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 19913,
                        "name": "checkpoints",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19826,
                        "src": "1338:11:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                        }
                      },
                      "id": 19915,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 19914,
                        "name": "min",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19868,
                        "src": "1350:3:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "IndexAccess",
                      "src": "1338:16:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                        "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                      }
                    },
                    "id": 19916,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "value",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 19990,
                    "src": "1338:22:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 19832,
                  "id": 19917,
                  "nodeType": "Return",
                  "src": "1331:29:58"
                }
              ]
            },
            "documentation": {
              "id": 19823,
              "nodeType": "StructuredDocumentation",
              "src": "284:202:58",
              "text": " @notice Queries a value at a defined checkpoint\n @param checkpoints array of Checkpoint objects\n @param timestamp timestamp to retrieve the value at\n @return uint256"
            },
            "id": 19919,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getValueAt",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 19829,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19826,
                  "mutability": "mutable",
                  "name": "checkpoints",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19919,
                  "src": "520:32:58",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                    "typeString": "struct CheckpointStorage.Checkpoint[]"
                  },
                  "typeName": {
                    "baseType": {
                      "contractScope": null,
                      "id": 19824,
                      "name": "Checkpoint",
                      "nodeType": "UserDefinedTypeName",
                      "referencedDeclaration": 19991,
                      "src": "520:10:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                        "typeString": "struct CheckpointStorage.Checkpoint"
                      }
                    },
                    "id": 19825,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "520:12:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                      "typeString": "struct CheckpointStorage.Checkpoint[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 19828,
                  "mutability": "mutable",
                  "name": "timestamp",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19919,
                  "src": "562:17:58",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19827,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "562:7:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "510:75:58"
            },
            "returnParameters": {
              "id": 19832,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19831,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19919,
                  "src": "635:7:58",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19830,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "635:7:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "634:9:58"
            },
            "scope": 19984,
            "src": "491:876:58",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 19982,
              "nodeType": "Block",
              "src": "1781:779:58",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 19943,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 19931,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 19928,
                          "name": "checkpoints",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19923,
                          "src": "2021:11:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                          }
                        },
                        "id": 19929,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "2021:18:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 19930,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2043:1:58",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "2021:23:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "||",
                    "rightExpression": {
                      "argumentTypes": null,
                      "components": [
                        {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19941,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 19932,
                              "name": "block",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -4,
                              "src": "2061:5:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_block",
                                "typeString": "block"
                              }
                            },
                            "id": 19933,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "2061:15:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "baseExpression": {
                                "argumentTypes": null,
                                "id": 19934,
                                "name": "checkpoints",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19923,
                                "src": "2079:11:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                  "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                }
                              },
                              "id": 19939,
                              "indexExpression": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 19938,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 19935,
                                    "name": "checkpoints",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19923,
                                    "src": "2091:11:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                      "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                    }
                                  },
                                  "id": 19936,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": null,
                                  "src": "2091:18:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "31",
                                  "id": 19937,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2112:1:58",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "2091:22:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "2079:35:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                              }
                            },
                            "id": 19940,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19988,
                            "src": "2079:45:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint128",
                              "typeString": "uint128"
                            }
                          },
                          "src": "2061:63:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "id": 19942,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "2060:65:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "2021:104:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 19980,
                    "nodeType": "Block",
                    "src": "2368:186:58",
                    "statements": [
                      {
                        "assignments": [
                          19966
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19966,
                            "mutability": "mutable",
                            "name": "oldCheckPoint",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 19980,
                            "src": "2432:32:58",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                              "typeString": "struct CheckpointStorage.Checkpoint"
                            },
                            "typeName": {
                              "contractScope": null,
                              "id": 19965,
                              "name": "Checkpoint",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19991,
                              "src": "2432:10:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 19973,
                        "initialValue": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 19967,
                            "name": "checkpoints",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19923,
                            "src": "2467:11:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                              "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                            }
                          },
                          "id": 19972,
                          "indexExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 19971,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 19968,
                                "name": "checkpoints",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19923,
                                "src": "2479:11:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                  "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                }
                              },
                              "id": 19969,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "2479:18:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "hexValue": "31",
                              "id": 19970,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2500:1:58",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            },
                            "src": "2479:22:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2467:35:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2432:70:58"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 19978,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 19974,
                              "name": "oldCheckPoint",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19966,
                              "src": "2516:13:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint storage pointer"
                              }
                            },
                            "id": 19976,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "value",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19990,
                            "src": "2516:19:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 19977,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19925,
                            "src": "2538:5:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2516:27:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 19979,
                        "nodeType": "ExpressionStatement",
                        "src": "2516:27:58"
                      }
                    ]
                  },
                  "id": 19981,
                  "nodeType": "IfStatement",
                  "src": "2004:550:58",
                  "trueBody": {
                    "id": 19964,
                    "nodeType": "Block",
                    "src": "2136:226:58",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 19950,
                                        "name": "block",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -4,
                                        "src": "2243:5:58",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_block",
                                          "typeString": "block"
                                        }
                                      },
                                      "id": 19951,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "timestamp",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": null,
                                      "src": "2243:15:58",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 19949,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2235:7:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint128_$",
                                      "typeString": "type(uint128)"
                                    },
                                    "typeName": {
                                      "id": 19948,
                                      "name": "uint128",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2235:7:58",
                                      "typeDescriptions": {
                                        "typeIdentifier": null,
                                        "typeString": null
                                      }
                                    }
                                  },
                                  "id": 19952,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2235:24:58",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 19953,
                                  "name": "value",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19925,
                                  "src": "2268:5:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 19947,
                                "name": "Checkpoint",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19991,
                                "src": "2211:10:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_struct$_Checkpoint_$19991_storage_ptr_$",
                                  "typeString": "type(struct CheckpointStorage.Checkpoint storage pointer)"
                                }
                              },
                              "id": 19954,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "structConstructorCall",
                              "lValueRequested": false,
                              "names": [
                                "timestamp",
                                "value"
                              ],
                              "nodeType": "FunctionCall",
                              "src": "2211:65:58",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_memory_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_memory_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint memory"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 19944,
                              "name": "checkpoints",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19923,
                              "src": "2194:11:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                              }
                            },
                            "id": 19946,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "push",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "2194:16:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Checkpoint_$19991_storage_$returns$__$",
                              "typeString": "function (struct CheckpointStorage.Checkpoint storage ref)"
                            }
                          },
                          "id": 19955,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2194:83:58",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 19956,
                        "nodeType": "ExpressionStatement",
                        "src": "2194:83:58"
                      },
                      {
                        "eventCall": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 19961,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 19958,
                                  "name": "checkpoints",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19923,
                                  "src": "2315:11:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                    "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                  }
                                },
                                "id": 19959,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "2315:18:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "31",
                                "id": 19960,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2336:1:58",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "2315:22:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19957,
                            "name": "CheckpointCreated",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19822,
                            "src": "2297:17:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 19962,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2297:41:58",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 19963,
                        "nodeType": "EmitStatement",
                        "src": "2292:46:58"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 19920,
              "nodeType": "StructuredDocumentation",
              "src": "1373:287:58",
              "text": " @notice Create a new checkpoint for a value if\n there does not exist a checkpoint for the current block timestamp,\n otherwise updates the value of the current checkpoint.\n @param checkpoints Checkpointed values\n @param value Value to be updated"
            },
            "id": 19983,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "updateValueAtNow",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 19926,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19923,
                  "mutability": "mutable",
                  "name": "checkpoints",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19983,
                  "src": "1701:32:58",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                    "typeString": "struct CheckpointStorage.Checkpoint[]"
                  },
                  "typeName": {
                    "baseType": {
                      "contractScope": null,
                      "id": 19921,
                      "name": "Checkpoint",
                      "nodeType": "UserDefinedTypeName",
                      "referencedDeclaration": 19991,
                      "src": "1701:10:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                        "typeString": "struct CheckpointStorage.Checkpoint"
                      }
                    },
                    "id": 19922,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "1701:12:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                      "typeString": "struct CheckpointStorage.Checkpoint[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 19925,
                  "mutability": "mutable",
                  "name": "value",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19983,
                  "src": "1743:10:58",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19924,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1743:4:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1691:68:58"
            },
            "returnParameters": {
              "id": 19927,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1781:0:58"
            },
            "scope": 19984,
            "src": "1666:894:58",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 19985,
        "src": "136:2426:58"
      }
    ],
    "src": "41:2521:58"
  },
  "legacyAST": {
    "absolutePath": "/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/ICT/Checkpoint/Checkpoint.sol",
    "exportedSymbols": {
      "Checkpoint": [
        19984
      ]
    },
    "id": 19985,
    "license": "Apache-2.0",
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 19814,
        "literals": [
          "solidity",
          "0.6",
          ".11"
        ],
        "nodeType": "PragmaDirective",
        "src": "41:23:58"
      },
      {
        "id": 19815,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "65:33:58"
      },
      {
        "absolutePath": "/Users/johannes/Documents/dev/actus-protocol/ap-monorepo/packages/ap-contracts/contracts/ICT/Checkpoint/CheckpointStorage.sol",
        "file": "./CheckpointStorage.sol",
        "id": 19816,
        "nodeType": "ImportDirective",
        "scope": 19985,
        "sourceUnit": 19993,
        "src": "100:33:58",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "abstract": false,
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 19817,
              "name": "CheckpointStorage",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 19992,
              "src": "159:17:58",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_CheckpointStorage_$19992",
                "typeString": "contract CheckpointStorage"
              }
            },
            "id": 19818,
            "nodeType": "InheritanceSpecifier",
            "src": "159:17:58"
          }
        ],
        "contractDependencies": [
          19992
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 19984,
        "linearizedBaseContracts": [
          19984,
          19992
        ],
        "name": "Checkpoint",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "anonymous": false,
            "documentation": null,
            "id": 19822,
            "name": "CheckpointCreated",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 19821,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19820,
                  "indexed": true,
                  "mutability": "mutable",
                  "name": "checkpointId",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19822,
                  "src": "248:28:58",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19819,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "248:7:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "247:30:58"
            },
            "src": "224:54:58"
          },
          {
            "body": {
              "id": 19918,
              "nodeType": "Block",
              "src": "648:719:58",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19836,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 19833,
                        "name": "checkpoints",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19826,
                        "src": "692:11:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                        }
                      },
                      "id": 19834,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "692:18:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "==",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 19835,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "714:1:58",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "692:23:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 19839,
                  "nodeType": "IfStatement",
                  "src": "688:37:58",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 19837,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "724:1:58",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "functionReturnParameters": 19832,
                    "id": 19838,
                    "nodeType": "Return",
                    "src": "717:8:58"
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19848,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 19840,
                      "name": "timestamp",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 19828,
                      "src": "781:9:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 19841,
                          "name": "checkpoints",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19826,
                          "src": "794:11:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                          }
                        },
                        "id": 19846,
                        "indexExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19845,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 19842,
                              "name": "checkpoints",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19826,
                              "src": "806:11:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                              }
                            },
                            "id": 19843,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "806:18:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 19844,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "827:1:58",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "806:22:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "794:35:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                        }
                      },
                      "id": 19847,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "timestamp",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 19988,
                      "src": "794:45:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint128",
                        "typeString": "uint128"
                      }
                    },
                    "src": "781:58:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 19857,
                  "nodeType": "IfStatement",
                  "src": "777:124:58",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 19849,
                          "name": "checkpoints",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19826,
                          "src": "860:11:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                          }
                        },
                        "id": 19854,
                        "indexExpression": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19853,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 19850,
                              "name": "checkpoints",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19826,
                              "src": "872:11:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                              }
                            },
                            "id": 19851,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "length",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "872:18:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "-",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "31",
                            "id": 19852,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "893:1:58",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1_by_1",
                              "typeString": "int_const 1"
                            },
                            "value": "1"
                          },
                          "src": "872:22:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "860:35:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                        }
                      },
                      "id": 19855,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "value",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 19990,
                      "src": "860:41:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "functionReturnParameters": 19832,
                    "id": 19856,
                    "nodeType": "Return",
                    "src": "853:48:58"
                  }
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19863,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 19858,
                      "name": "timestamp",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 19828,
                      "src": "915:9:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<",
                    "rightExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "baseExpression": {
                          "argumentTypes": null,
                          "id": 19859,
                          "name": "checkpoints",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19826,
                          "src": "927:11:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                          }
                        },
                        "id": 19861,
                        "indexExpression": {
                          "argumentTypes": null,
                          "hexValue": "30",
                          "id": 19860,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": true,
                          "kind": "number",
                          "lValueRequested": false,
                          "nodeType": "Literal",
                          "src": "939:1:58",
                          "subdenomination": null,
                          "typeDescriptions": {
                            "typeIdentifier": "t_rational_0_by_1",
                            "typeString": "int_const 0"
                          },
                          "value": "0"
                        },
                        "isConstant": false,
                        "isLValue": true,
                        "isPure": false,
                        "lValueRequested": false,
                        "nodeType": "IndexAccess",
                        "src": "927:14:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                        }
                      },
                      "id": 19862,
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "timestamp",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": 19988,
                      "src": "927:24:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint128",
                        "typeString": "uint128"
                      }
                    },
                    "src": "915:36:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": null,
                  "id": 19866,
                  "nodeType": "IfStatement",
                  "src": "911:50:58",
                  "trueBody": {
                    "expression": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 19864,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "960:1:58",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "functionReturnParameters": 19832,
                    "id": 19865,
                    "nodeType": "Return",
                    "src": "953:8:58"
                  }
                },
                {
                  "assignments": [
                    19868
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 19868,
                      "mutability": "mutable",
                      "name": "min",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 19918,
                      "src": "1023:11:58",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 19867,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1023:7:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 19870,
                  "initialValue": {
                    "argumentTypes": null,
                    "hexValue": "30",
                    "id": 19869,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "number",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1037:1:58",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_rational_0_by_1",
                      "typeString": "int_const 0"
                    },
                    "value": "0"
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1023:15:58"
                },
                {
                  "assignments": [
                    19872
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 19872,
                      "mutability": "mutable",
                      "name": "max",
                      "nodeType": "VariableDeclaration",
                      "overrides": null,
                      "scope": 19918,
                      "src": "1048:11:58",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 19871,
                        "name": "uint256",
                        "nodeType": "ElementaryTypeName",
                        "src": "1048:7:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 19877,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19876,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "expression": {
                        "argumentTypes": null,
                        "id": 19873,
                        "name": "checkpoints",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19826,
                        "src": "1062:11:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                        }
                      },
                      "id": 19874,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "memberName": "length",
                      "nodeType": "MemberAccess",
                      "referencedDeclaration": null,
                      "src": "1062:18:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "-",
                    "rightExpression": {
                      "argumentTypes": null,
                      "hexValue": "31",
                      "id": 19875,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "1083:1:58",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_1_by_1",
                        "typeString": "int_const 1"
                      },
                      "value": "1"
                    },
                    "src": "1062:22:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "1048:36:58"
                },
                {
                  "body": {
                    "id": 19911,
                    "nodeType": "Block",
                    "src": "1112:210:58",
                    "statements": [
                      {
                        "assignments": [
                          19882
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19882,
                            "mutability": "mutable",
                            "name": "mid",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 19911,
                            "src": "1126:11:58",
                            "stateVariable": false,
                            "storageLocation": "default",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "typeName": {
                              "id": 19881,
                              "name": "uint256",
                              "nodeType": "ElementaryTypeName",
                              "src": "1126:7:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 19891,
                        "initialValue": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19890,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "components": [
                              {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 19887,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 19885,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 19883,
                                    "name": "max",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19872,
                                    "src": "1141:3:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "+",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "id": 19884,
                                    "name": "min",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19868,
                                    "src": "1147:3:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "src": "1141:9:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "+",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "31",
                                  "id": 19886,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "1153:1:58",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "1141:13:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              }
                            ],
                            "id": 19888,
                            "isConstant": false,
                            "isInlineArray": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "nodeType": "TupleExpression",
                            "src": "1140:15:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "/",
                          "rightExpression": {
                            "argumentTypes": null,
                            "hexValue": "32",
                            "id": 19889,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1158:1:58",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_2_by_1",
                              "typeString": "int_const 2"
                            },
                            "value": "2"
                          },
                          "src": "1140:19:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "1126:33:58"
                      },
                      {
                        "condition": {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19897,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "baseExpression": {
                                "argumentTypes": null,
                                "id": 19892,
                                "name": "checkpoints",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19826,
                                "src": "1177:11:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                  "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                }
                              },
                              "id": 19894,
                              "indexExpression": {
                                "argumentTypes": null,
                                "id": 19893,
                                "name": "mid",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19882,
                                "src": "1189:3:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "1177:16:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                              }
                            },
                            "id": 19895,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19988,
                            "src": "1177:26:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint128",
                              "typeString": "uint128"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": "<=",
                          "rightExpression": {
                            "argumentTypes": null,
                            "id": 19896,
                            "name": "timestamp",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19828,
                            "src": "1207:9:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "1177:39:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        },
                        "falseBody": {
                          "id": 19909,
                          "nodeType": "Block",
                          "src": "1266:46:58",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 19907,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 19903,
                                  "name": "max",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19872,
                                  "src": "1284:3:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "commonType": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  },
                                  "id": 19906,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "leftExpression": {
                                    "argumentTypes": null,
                                    "id": 19904,
                                    "name": "mid",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19882,
                                    "src": "1290:3:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_uint256",
                                      "typeString": "uint256"
                                    }
                                  },
                                  "nodeType": "BinaryOperation",
                                  "operator": "-",
                                  "rightExpression": {
                                    "argumentTypes": null,
                                    "hexValue": "31",
                                    "id": 19905,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "kind": "number",
                                    "lValueRequested": false,
                                    "nodeType": "Literal",
                                    "src": "1296:1:58",
                                    "subdenomination": null,
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_rational_1_by_1",
                                      "typeString": "int_const 1"
                                    },
                                    "value": "1"
                                  },
                                  "src": "1290:7:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1284:13:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 19908,
                              "nodeType": "ExpressionStatement",
                              "src": "1284:13:58"
                            }
                          ]
                        },
                        "id": 19910,
                        "nodeType": "IfStatement",
                        "src": "1173:139:58",
                        "trueBody": {
                          "id": 19902,
                          "nodeType": "Block",
                          "src": "1218:42:58",
                          "statements": [
                            {
                              "expression": {
                                "argumentTypes": null,
                                "id": 19900,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftHandSide": {
                                  "argumentTypes": null,
                                  "id": 19898,
                                  "name": "min",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19868,
                                  "src": "1236:3:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "Assignment",
                                "operator": "=",
                                "rightHandSide": {
                                  "argumentTypes": null,
                                  "id": 19899,
                                  "name": "mid",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19882,
                                  "src": "1242:3:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "src": "1236:9:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "id": 19901,
                              "nodeType": "ExpressionStatement",
                              "src": "1236:9:58"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 19880,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 19878,
                      "name": "max",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 19872,
                      "src": "1101:3:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": ">",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 19879,
                      "name": "min",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 19868,
                      "src": "1107:3:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1101:9:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "id": 19912,
                  "nodeType": "WhileStatement",
                  "src": "1094:228:58"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "expression": {
                      "argumentTypes": null,
                      "baseExpression": {
                        "argumentTypes": null,
                        "id": 19913,
                        "name": "checkpoints",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19826,
                        "src": "1338:11:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                          "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                        }
                      },
                      "id": 19915,
                      "indexExpression": {
                        "argumentTypes": null,
                        "id": 19914,
                        "name": "min",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 19868,
                        "src": "1350:3:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "isConstant": false,
                      "isLValue": true,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "IndexAccess",
                      "src": "1338:16:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                        "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                      }
                    },
                    "id": 19916,
                    "isConstant": false,
                    "isLValue": true,
                    "isPure": false,
                    "lValueRequested": false,
                    "memberName": "value",
                    "nodeType": "MemberAccess",
                    "referencedDeclaration": 19990,
                    "src": "1338:22:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "functionReturnParameters": 19832,
                  "id": 19917,
                  "nodeType": "Return",
                  "src": "1331:29:58"
                }
              ]
            },
            "documentation": {
              "id": 19823,
              "nodeType": "StructuredDocumentation",
              "src": "284:202:58",
              "text": " @notice Queries a value at a defined checkpoint\n @param checkpoints array of Checkpoint objects\n @param timestamp timestamp to retrieve the value at\n @return uint256"
            },
            "id": 19919,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getValueAt",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 19829,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19826,
                  "mutability": "mutable",
                  "name": "checkpoints",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19919,
                  "src": "520:32:58",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                    "typeString": "struct CheckpointStorage.Checkpoint[]"
                  },
                  "typeName": {
                    "baseType": {
                      "contractScope": null,
                      "id": 19824,
                      "name": "Checkpoint",
                      "nodeType": "UserDefinedTypeName",
                      "referencedDeclaration": 19991,
                      "src": "520:10:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                        "typeString": "struct CheckpointStorage.Checkpoint"
                      }
                    },
                    "id": 19825,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "520:12:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                      "typeString": "struct CheckpointStorage.Checkpoint[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 19828,
                  "mutability": "mutable",
                  "name": "timestamp",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19919,
                  "src": "562:17:58",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19827,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "562:7:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "510:75:58"
            },
            "returnParameters": {
              "id": 19832,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19831,
                  "mutability": "mutable",
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19919,
                  "src": "635:7:58",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19830,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "635:7:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "634:9:58"
            },
            "scope": 19984,
            "src": "491:876:58",
            "stateMutability": "view",
            "virtual": false,
            "visibility": "internal"
          },
          {
            "body": {
              "id": 19982,
              "nodeType": "Block",
              "src": "1781:779:58",
              "statements": [
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "id": 19943,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 19931,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "expression": {
                          "argumentTypes": null,
                          "id": 19928,
                          "name": "checkpoints",
                          "nodeType": "Identifier",
                          "overloadedDeclarations": [],
                          "referencedDeclaration": 19923,
                          "src": "2021:11:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                          }
                        },
                        "id": 19929,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": false,
                        "lValueRequested": false,
                        "memberName": "length",
                        "nodeType": "MemberAccess",
                        "referencedDeclaration": null,
                        "src": "2021:18:58",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "==",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "30",
                        "id": 19930,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "2043:1:58",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_0_by_1",
                          "typeString": "int_const 0"
                        },
                        "value": "0"
                      },
                      "src": "2021:23:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "||",
                    "rightExpression": {
                      "argumentTypes": null,
                      "components": [
                        {
                          "argumentTypes": null,
                          "commonType": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          },
                          "id": 19941,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 19932,
                              "name": "block",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": -4,
                              "src": "2061:5:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_magic_block",
                                "typeString": "block"
                              }
                            },
                            "id": 19933,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "2061:15:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "BinaryOperation",
                          "operator": ">",
                          "rightExpression": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "baseExpression": {
                                "argumentTypes": null,
                                "id": 19934,
                                "name": "checkpoints",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19923,
                                "src": "2079:11:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                  "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                }
                              },
                              "id": 19939,
                              "indexExpression": {
                                "argumentTypes": null,
                                "commonType": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                },
                                "id": 19938,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "leftExpression": {
                                  "argumentTypes": null,
                                  "expression": {
                                    "argumentTypes": null,
                                    "id": 19935,
                                    "name": "checkpoints",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 19923,
                                    "src": "2091:11:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                      "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                    }
                                  },
                                  "id": 19936,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "lValueRequested": false,
                                  "memberName": "length",
                                  "nodeType": "MemberAccess",
                                  "referencedDeclaration": null,
                                  "src": "2091:18:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                },
                                "nodeType": "BinaryOperation",
                                "operator": "-",
                                "rightExpression": {
                                  "argumentTypes": null,
                                  "hexValue": "31",
                                  "id": 19937,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": true,
                                  "kind": "number",
                                  "lValueRequested": false,
                                  "nodeType": "Literal",
                                  "src": "2112:1:58",
                                  "subdenomination": null,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_rational_1_by_1",
                                    "typeString": "int_const 1"
                                  },
                                  "value": "1"
                                },
                                "src": "2091:22:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "isConstant": false,
                              "isLValue": true,
                              "isPure": false,
                              "lValueRequested": false,
                              "nodeType": "IndexAccess",
                              "src": "2079:35:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                              }
                            },
                            "id": 19940,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "timestamp",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19988,
                            "src": "2079:45:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint128",
                              "typeString": "uint128"
                            }
                          },
                          "src": "2061:63:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_bool",
                            "typeString": "bool"
                          }
                        }
                      ],
                      "id": 19942,
                      "isConstant": false,
                      "isInlineArray": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "nodeType": "TupleExpression",
                      "src": "2060:65:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_bool",
                        "typeString": "bool"
                      }
                    },
                    "src": "2021:104:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 19980,
                    "nodeType": "Block",
                    "src": "2368:186:58",
                    "statements": [
                      {
                        "assignments": [
                          19966
                        ],
                        "declarations": [
                          {
                            "constant": false,
                            "id": 19966,
                            "mutability": "mutable",
                            "name": "oldCheckPoint",
                            "nodeType": "VariableDeclaration",
                            "overrides": null,
                            "scope": 19980,
                            "src": "2432:32:58",
                            "stateVariable": false,
                            "storageLocation": "storage",
                            "typeDescriptions": {
                              "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                              "typeString": "struct CheckpointStorage.Checkpoint"
                            },
                            "typeName": {
                              "contractScope": null,
                              "id": 19965,
                              "name": "Checkpoint",
                              "nodeType": "UserDefinedTypeName",
                              "referencedDeclaration": 19991,
                              "src": "2432:10:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint"
                              }
                            },
                            "value": null,
                            "visibility": "internal"
                          }
                        ],
                        "id": 19973,
                        "initialValue": {
                          "argumentTypes": null,
                          "baseExpression": {
                            "argumentTypes": null,
                            "id": 19967,
                            "name": "checkpoints",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19923,
                            "src": "2467:11:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                              "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                            }
                          },
                          "id": 19972,
                          "indexExpression": {
                            "argumentTypes": null,
                            "commonType": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            },
                            "id": 19971,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "leftExpression": {
                              "argumentTypes": null,
                              "expression": {
                                "argumentTypes": null,
                                "id": 19968,
                                "name": "checkpoints",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19923,
                                "src": "2479:11:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                  "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                }
                              },
                              "id": 19969,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "memberName": "length",
                              "nodeType": "MemberAccess",
                              "referencedDeclaration": null,
                              "src": "2479:18:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            },
                            "nodeType": "BinaryOperation",
                            "operator": "-",
                            "rightExpression": {
                              "argumentTypes": null,
                              "hexValue": "31",
                              "id": 19970,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": true,
                              "kind": "number",
                              "lValueRequested": false,
                              "nodeType": "Literal",
                              "src": "2500:1:58",
                              "subdenomination": null,
                              "typeDescriptions": {
                                "typeIdentifier": "t_rational_1_by_1",
                                "typeString": "int_const 1"
                              },
                              "value": "1"
                            },
                            "src": "2479:22:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "isConstant": false,
                          "isLValue": true,
                          "isPure": false,
                          "lValueRequested": false,
                          "nodeType": "IndexAccess",
                          "src": "2467:35:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_struct$_Checkpoint_$19991_storage",
                            "typeString": "struct CheckpointStorage.Checkpoint storage ref"
                          }
                        },
                        "nodeType": "VariableDeclarationStatement",
                        "src": "2432:70:58"
                      },
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 19978,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "expression": {
                              "argumentTypes": null,
                              "id": 19974,
                              "name": "oldCheckPoint",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19966,
                              "src": "2516:13:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint storage pointer"
                              }
                            },
                            "id": 19976,
                            "isConstant": false,
                            "isLValue": true,
                            "isPure": false,
                            "lValueRequested": true,
                            "memberName": "value",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": 19990,
                            "src": "2516:19:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "id": 19977,
                            "name": "value",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19925,
                            "src": "2538:5:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "src": "2516:27:58",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 19979,
                        "nodeType": "ExpressionStatement",
                        "src": "2516:27:58"
                      }
                    ]
                  },
                  "id": 19981,
                  "nodeType": "IfStatement",
                  "src": "2004:550:58",
                  "trueBody": {
                    "id": 19964,
                    "nodeType": "Block",
                    "src": "2136:226:58",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "arguments": [
                                {
                                  "argumentTypes": null,
                                  "arguments": [
                                    {
                                      "argumentTypes": null,
                                      "expression": {
                                        "argumentTypes": null,
                                        "id": 19950,
                                        "name": "block",
                                        "nodeType": "Identifier",
                                        "overloadedDeclarations": [],
                                        "referencedDeclaration": -4,
                                        "src": "2243:5:58",
                                        "typeDescriptions": {
                                          "typeIdentifier": "t_magic_block",
                                          "typeString": "block"
                                        }
                                      },
                                      "id": 19951,
                                      "isConstant": false,
                                      "isLValue": false,
                                      "isPure": false,
                                      "lValueRequested": false,
                                      "memberName": "timestamp",
                                      "nodeType": "MemberAccess",
                                      "referencedDeclaration": null,
                                      "src": "2243:15:58",
                                      "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    }
                                  ],
                                  "expression": {
                                    "argumentTypes": [
                                      {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                      }
                                    ],
                                    "id": 19949,
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "nodeType": "ElementaryTypeNameExpression",
                                    "src": "2235:7:58",
                                    "typeDescriptions": {
                                      "typeIdentifier": "t_type$_t_uint128_$",
                                      "typeString": "type(uint128)"
                                    },
                                    "typeName": {
                                      "id": 19948,
                                      "name": "uint128",
                                      "nodeType": "ElementaryTypeName",
                                      "src": "2235:7:58",
                                      "typeDescriptions": {
                                        "typeIdentifier": null,
                                        "typeString": null
                                      }
                                    }
                                  },
                                  "id": 19952,
                                  "isConstant": false,
                                  "isLValue": false,
                                  "isPure": false,
                                  "kind": "typeConversion",
                                  "lValueRequested": false,
                                  "names": [],
                                  "nodeType": "FunctionCall",
                                  "src": "2235:24:58",
                                  "tryCall": false,
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  }
                                },
                                {
                                  "argumentTypes": null,
                                  "id": 19953,
                                  "name": "value",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19925,
                                  "src": "2268:5:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                }
                              ],
                              "expression": {
                                "argumentTypes": [
                                  {
                                    "typeIdentifier": "t_uint128",
                                    "typeString": "uint128"
                                  },
                                  {
                                    "typeIdentifier": "t_uint256",
                                    "typeString": "uint256"
                                  }
                                ],
                                "id": 19947,
                                "name": "Checkpoint",
                                "nodeType": "Identifier",
                                "overloadedDeclarations": [],
                                "referencedDeclaration": 19991,
                                "src": "2211:10:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_type$_t_struct$_Checkpoint_$19991_storage_ptr_$",
                                  "typeString": "type(struct CheckpointStorage.Checkpoint storage pointer)"
                                }
                              },
                              "id": 19954,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "kind": "structConstructorCall",
                              "lValueRequested": false,
                              "names": [
                                "timestamp",
                                "value"
                              ],
                              "nodeType": "FunctionCall",
                              "src": "2211:65:58",
                              "tryCall": false,
                              "typeDescriptions": {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_memory_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint memory"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_struct$_Checkpoint_$19991_memory_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint memory"
                              }
                            ],
                            "expression": {
                              "argumentTypes": null,
                              "id": 19944,
                              "name": "checkpoints",
                              "nodeType": "Identifier",
                              "overloadedDeclarations": [],
                              "referencedDeclaration": 19923,
                              "src": "2194:11:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                              }
                            },
                            "id": 19946,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": false,
                            "lValueRequested": false,
                            "memberName": "push",
                            "nodeType": "MemberAccess",
                            "referencedDeclaration": null,
                            "src": "2194:16:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_arraypush_nonpayable$_t_struct$_Checkpoint_$19991_storage_$returns$__$",
                              "typeString": "function (struct CheckpointStorage.Checkpoint storage ref)"
                            }
                          },
                          "id": 19955,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2194:83:58",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 19956,
                        "nodeType": "ExpressionStatement",
                        "src": "2194:83:58"
                      },
                      {
                        "eventCall": {
                          "argumentTypes": null,
                          "arguments": [
                            {
                              "argumentTypes": null,
                              "commonType": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              },
                              "id": 19961,
                              "isConstant": false,
                              "isLValue": false,
                              "isPure": false,
                              "lValueRequested": false,
                              "leftExpression": {
                                "argumentTypes": null,
                                "expression": {
                                  "argumentTypes": null,
                                  "id": 19958,
                                  "name": "checkpoints",
                                  "nodeType": "Identifier",
                                  "overloadedDeclarations": [],
                                  "referencedDeclaration": 19923,
                                  "src": "2315:11:58",
                                  "typeDescriptions": {
                                    "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                                    "typeString": "struct CheckpointStorage.Checkpoint storage ref[] storage pointer"
                                  }
                                },
                                "id": 19959,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": false,
                                "lValueRequested": false,
                                "memberName": "length",
                                "nodeType": "MemberAccess",
                                "referencedDeclaration": null,
                                "src": "2315:18:58",
                                "typeDescriptions": {
                                  "typeIdentifier": "t_uint256",
                                  "typeString": "uint256"
                                }
                              },
                              "nodeType": "BinaryOperation",
                              "operator": "-",
                              "rightExpression": {
                                "argumentTypes": null,
                                "hexValue": "31",
                                "id": 19960,
                                "isConstant": false,
                                "isLValue": false,
                                "isPure": true,
                                "kind": "number",
                                "lValueRequested": false,
                                "nodeType": "Literal",
                                "src": "2336:1:58",
                                "subdenomination": null,
                                "typeDescriptions": {
                                  "typeIdentifier": "t_rational_1_by_1",
                                  "typeString": "int_const 1"
                                },
                                "value": "1"
                              },
                              "src": "2315:22:58",
                              "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            }
                          ],
                          "expression": {
                            "argumentTypes": [
                              {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                              }
                            ],
                            "id": 19957,
                            "name": "CheckpointCreated",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 19822,
                            "src": "2297:17:58",
                            "typeDescriptions": {
                              "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$returns$__$",
                              "typeString": "function (uint256)"
                            }
                          },
                          "id": 19962,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "kind": "functionCall",
                          "lValueRequested": false,
                          "names": [],
                          "nodeType": "FunctionCall",
                          "src": "2297:41:58",
                          "tryCall": false,
                          "typeDescriptions": {
                            "typeIdentifier": "t_tuple$__$",
                            "typeString": "tuple()"
                          }
                        },
                        "id": 19963,
                        "nodeType": "EmitStatement",
                        "src": "2292:46:58"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": {
              "id": 19920,
              "nodeType": "StructuredDocumentation",
              "src": "1373:287:58",
              "text": " @notice Create a new checkpoint for a value if\n there does not exist a checkpoint for the current block timestamp,\n otherwise updates the value of the current checkpoint.\n @param checkpoints Checkpointed values\n @param value Value to be updated"
            },
            "id": 19983,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "updateValueAtNow",
            "nodeType": "FunctionDefinition",
            "overrides": null,
            "parameters": {
              "id": 19926,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 19923,
                  "mutability": "mutable",
                  "name": "checkpoints",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19983,
                  "src": "1701:32:58",
                  "stateVariable": false,
                  "storageLocation": "storage",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                    "typeString": "struct CheckpointStorage.Checkpoint[]"
                  },
                  "typeName": {
                    "baseType": {
                      "contractScope": null,
                      "id": 19921,
                      "name": "Checkpoint",
                      "nodeType": "UserDefinedTypeName",
                      "referencedDeclaration": 19991,
                      "src": "1701:10:58",
                      "typeDescriptions": {
                        "typeIdentifier": "t_struct$_Checkpoint_$19991_storage_ptr",
                        "typeString": "struct CheckpointStorage.Checkpoint"
                      }
                    },
                    "id": 19922,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "1701:12:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_struct$_Checkpoint_$19991_storage_$dyn_storage_ptr",
                      "typeString": "struct CheckpointStorage.Checkpoint[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 19925,
                  "mutability": "mutable",
                  "name": "value",
                  "nodeType": "VariableDeclaration",
                  "overrides": null,
                  "scope": 19983,
                  "src": "1743:10:58",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 19924,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "1743:4:58",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1691:68:58"
            },
            "returnParameters": {
              "id": 19927,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1781:0:58"
            },
            "scope": 19984,
            "src": "1666:894:58",
            "stateMutability": "nonpayable",
            "virtual": false,
            "visibility": "internal"
          }
        ],
        "scope": 19985,
        "src": "136:2426:58"
      }
    ],
    "src": "41:2521:58"
  },
  "compiler": {
    "name": "solc",
    "version": "0.6.11+commit.5ef660b1.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.2.0",
  "updatedAt": "2020-08-12T09:47:18.178Z",
  "devdoc": {
    "kind": "dev",
    "methods": {},
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {},
    "version": 1
  }
}