{
  "contractName": "InterestRateModelMock",
  "abi": [
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "cash",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "borrows",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "reserves",
          "type": "uint256"
        }
      ],
      "name": "getBorrowRate",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "success",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "rate",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "isInterestRateModel",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cash\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"borrows\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reserves\",\"type\":\"uint256\"}],\"name\":\"getBorrowRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"success\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isInterestRateModel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"getBorrowRate(uint256,uint256,uint256)\":{\"details\":\"The return value should be scaled by 1e18, thus a return value of     `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per block*.\",\"params\":{\"borrows\":\"The total borrows of the underlying asset in the CToken\",\"cash\":\"The total cash of the underlying asset in the CToken\",\"reserves\":\"The total reserves of the underlying asset in the CToken\"},\"return\":\"Success or failure and the borrow interest rate per block scaled by 10e18\"}}},\"userdoc\":{\"methods\":{\"getBorrowRate(uint256,uint256,uint256)\":{\"notice\":\"Gets the current borrow interest rate based on the given asset, total cash, total borrows        and total reserves.\"}}}},\"settings\":{\"compilationTarget\":{\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/test/InterestRateModelMock.sol\":\"InterestRateModelMock\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/compound/contracts/InterestRateModel.sol\":{\"keccak256\":\"0x1aca227009cbde84beabddc89823f55130c2519823d4669d4e714a2a798af6c2\",\"urls\":[\"bzz-raw://cb8fc34b58cd973fa29d1636a5ecf02858f355f477ffc7525acf62e1c3aa5977\",\"dweb:/ipfs/QmXiAaRwvSw7FFLzuyJD7zwxZrGAhLEo4APJZjDc8yXYem\"]},\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/test/InterestRateModelMock.sol\":{\"keccak256\":\"0x0b4a742a419f372015d31a434815b89d8f728dd4e24e91ec11c647c7e526ae33\",\"urls\":[\"bzz-raw://e549cbafa9d8d03074f09e87e20b88793156889ccb2fa89c8302a8760e00dce7\",\"dweb:/ipfs/QmXKMvY7hAJMc7kD42B32Txgjn2z6jQh6ckmcdBi5EeY9h\"]}},\"version\":1}",
  "bytecode": "0x608060405234801561001057600080fd5b5060fa8061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c806315f240531460375780632191f92a146076575b600080fd5b605d60048036036060811015604b57600080fd5b50803590602081013590604001356090565b6040805192835260208301919091528051918290030190f35b607c60c0565b604080519115158252519081900360200190f35b600080848401830160028104851160ad5764e8d4a51000915060b7565b6509184e72a00091505b50935093915050565b60019056fea265627a7a72315820ddd4d6de132130f2d4ac7a2403e51d60a4bad2eaea8409c031b1004c6d12389664736f6c634300050c0032",
  "deployedBytecode": "0x6080604052348015600f57600080fd5b506004361060325760003560e01c806315f240531460375780632191f92a146076575b600080fd5b605d60048036036060811015604b57600080fd5b50803590602081013590604001356090565b6040805192835260208301919091528051918290030190f35b607c60c0565b604080519115158252519081900360200190f35b600080848401830160028104851160ad5764e8d4a51000915060b7565b6509184e72a00091505b50935093915050565b60019056fea265627a7a72315820ddd4d6de132130f2d4ac7a2403e51d60a4bad2eaea8409c031b1004c6d12389664736f6c634300050c0032",
  "sourceMap": "83:1243:24:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;83:1243:24;;;;;;;",
  "deployedSourceMap": "83:1243:24:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;83:1243:24;;;;;;;;;;;;;;;;;;;;;;;;801:440;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;801:440:24;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1247:76;;;:::i;:::-;;;;;;;;;;;;;;;;;;801:440;899:12;;947:14;;;:25;;1026:1;947:25;1018:9;1007:7;:20;1003:232;;1076:13;1069:20;;1003:232;;;1184:14;1177:21;;1003:232;801:440;;;;;;;:::o;1247:76::-;1316:4;1247:76;:::o",
  "source": "pragma solidity ^0.5.8;\n\nimport \"../../compound/contracts/InterestRateModel.sol\";\n\ncontract InterestRateModelMock is InterestRateModel {\n\n    /**\n      * @notice Gets the current borrow interest rate based on the given asset, total cash, total borrows\n      *         and total reserves.\n      * @dev The return value should be scaled by 1e18, thus a return value of\n      *      `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per block*.\n      * @param cash The total cash of the underlying asset in the CToken\n      * @param borrows The total borrows of the underlying asset in the CToken\n      * @param reserves The total reserves of the underlying asset in the CToken\n      * @return Success or failure and the borrow interest rate per block scaled by 10e18\n      */\n    function getBorrowRate(uint cash, uint borrows, uint reserves)\n            external view returns (uint success, uint rate) {\n        uint total = cash + borrows + reserves;\n        success = 0;\n        if (borrows <= total / 2) {\n            // binge mode\n            rate = 1000000000000; /* 0.0001% *per block*. */\n        } else {\n            // austerity mode\n            rate = 10000000000000; /* 0.001% *per block*. */\n        }\n    }\n\n    function isInterestRateModel() external view returns (bool) { return true; }\n\n}\n",
  "sourcePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/test/InterestRateModelMock.sol",
  "ast": {
    "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/test/InterestRateModelMock.sol",
    "exportedSymbols": {
      "InterestRateModelMock": [
        10180
      ]
    },
    "id": 10181,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 10126,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".8"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:24"
      },
      {
        "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/compound/contracts/InterestRateModel.sol",
        "file": "../../compound/contracts/InterestRateModel.sol",
        "id": 10127,
        "nodeType": "ImportDirective",
        "scope": 10181,
        "sourceUnit": 5820,
        "src": "25:56:24",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 10128,
              "name": "InterestRateModel",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 5819,
              "src": "117:17:24",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_InterestRateModel_$5819",
                "typeString": "contract InterestRateModel"
              }
            },
            "id": 10129,
            "nodeType": "InheritanceSpecifier",
            "src": "117:17:24"
          }
        ],
        "contractDependencies": [
          5819
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 10180,
        "linearizedBaseContracts": [
          10180,
          5819
        ],
        "name": "InterestRateModelMock",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 10170,
              "nodeType": "Block",
              "src": "924:317:24",
              "statements": [
                {
                  "assignments": [
                    10143
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 10143,
                      "name": "total",
                      "nodeType": "VariableDeclaration",
                      "scope": 10170,
                      "src": "934:10:24",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 10142,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "934:4:24",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 10149,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 10148,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 10146,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 10144,
                        "name": "cash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10131,
                        "src": "947:4:24",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 10145,
                        "name": "borrows",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10133,
                        "src": "954:7:24",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "947:14:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "+",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 10147,
                      "name": "reserves",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10135,
                      "src": "964:8:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "947:25:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "934:38:24"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 10152,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 10150,
                      "name": "success",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10138,
                      "src": "982:7:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 10151,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "992:1:24",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "982:11:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 10153,
                  "nodeType": "ExpressionStatement",
                  "src": "982:11:24"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 10158,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 10154,
                      "name": "borrows",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10133,
                      "src": "1007:7:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 10157,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 10155,
                        "name": "total",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10143,
                        "src": "1018:5:24",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "/",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "32",
                        "id": 10156,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1026:1:24",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_2_by_1",
                          "typeString": "int_const 2"
                        },
                        "value": "2"
                      },
                      "src": "1018:9:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1007:20:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 10168,
                    "nodeType": "Block",
                    "src": "1133:102:24",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 10166,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 10164,
                            "name": "rate",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10140,
                            "src": "1177:4:24",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3130303030303030303030303030",
                            "id": 10165,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1184:14:24",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_10000000000000_by_1",
                              "typeString": "int_const 10000000000000"
                            },
                            "value": "10000000000000"
                          },
                          "src": "1177:21:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 10167,
                        "nodeType": "ExpressionStatement",
                        "src": "1177:21:24"
                      }
                    ]
                  },
                  "id": 10169,
                  "nodeType": "IfStatement",
                  "src": "1003:232:24",
                  "trueBody": {
                    "id": 10163,
                    "nodeType": "Block",
                    "src": "1029:98:24",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 10161,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 10159,
                            "name": "rate",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10140,
                            "src": "1069:4:24",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "31303030303030303030303030",
                            "id": 10160,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1076:13:24",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1000000000000_by_1",
                              "typeString": "int_const 1000000000000"
                            },
                            "value": "1000000000000"
                          },
                          "src": "1069:20:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 10162,
                        "nodeType": "ExpressionStatement",
                        "src": "1069:20:24"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@notice Gets the current borrow interest rate based on the given asset, total cash, total borrows\n        and total reserves.\n@dev The return value should be scaled by 1e18, thus a return value of\n     `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per block*.\n@param cash The total cash of the underlying asset in the CToken\n@param borrows The total borrows of the underlying asset in the CToken\n@param reserves The total reserves of the underlying asset in the CToken\n@return Success or failure and the borrow interest rate per block scaled by 10e18",
            "id": 10171,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getBorrowRate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10136,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10131,
                  "name": "cash",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "824:9:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10130,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "824:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 10133,
                  "name": "borrows",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "835:12:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10132,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "835:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 10135,
                  "name": "reserves",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "849:13:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10134,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "849:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "823:40:24"
            },
            "returnParameters": {
              "id": 10141,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10138,
                  "name": "success",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "899:12:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10137,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "899:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 10140,
                  "name": "rate",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "913:9:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10139,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "913:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "898:25:24"
            },
            "scope": 10180,
            "src": "801:440:24",
            "stateMutability": "view",
            "superFunction": 5813,
            "visibility": "external"
          },
          {
            "body": {
              "id": 10178,
              "nodeType": "Block",
              "src": "1307:16:24",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 10176,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1316:4:24",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 10175,
                  "id": 10177,
                  "nodeType": "Return",
                  "src": "1309:11:24"
                }
              ]
            },
            "documentation": null,
            "id": 10179,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isInterestRateModel",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10172,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1275:2:24"
            },
            "returnParameters": {
              "id": 10175,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10174,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 10179,
                  "src": "1301:4:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 10173,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1301:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1300:6:24"
            },
            "scope": 10180,
            "src": "1247:76:24",
            "stateMutability": "view",
            "superFunction": 5818,
            "visibility": "external"
          }
        ],
        "scope": 10181,
        "src": "83:1243:24"
      }
    ],
    "src": "0:1327:24"
  },
  "legacyAST": {
    "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/test/InterestRateModelMock.sol",
    "exportedSymbols": {
      "InterestRateModelMock": [
        10180
      ]
    },
    "id": 10181,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 10126,
        "literals": [
          "solidity",
          "^",
          "0.5",
          ".8"
        ],
        "nodeType": "PragmaDirective",
        "src": "0:23:24"
      },
      {
        "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/compound/contracts/InterestRateModel.sol",
        "file": "../../compound/contracts/InterestRateModel.sol",
        "id": 10127,
        "nodeType": "ImportDirective",
        "scope": 10181,
        "sourceUnit": 5820,
        "src": "25:56:24",
        "symbolAliases": [],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 10128,
              "name": "InterestRateModel",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 5819,
              "src": "117:17:24",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_InterestRateModel_$5819",
                "typeString": "contract InterestRateModel"
              }
            },
            "id": 10129,
            "nodeType": "InheritanceSpecifier",
            "src": "117:17:24"
          }
        ],
        "contractDependencies": [
          5819
        ],
        "contractKind": "contract",
        "documentation": null,
        "fullyImplemented": true,
        "id": 10180,
        "linearizedBaseContracts": [
          10180,
          5819
        ],
        "name": "InterestRateModelMock",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": {
              "id": 10170,
              "nodeType": "Block",
              "src": "924:317:24",
              "statements": [
                {
                  "assignments": [
                    10143
                  ],
                  "declarations": [
                    {
                      "constant": false,
                      "id": 10143,
                      "name": "total",
                      "nodeType": "VariableDeclaration",
                      "scope": 10170,
                      "src": "934:10:24",
                      "stateVariable": false,
                      "storageLocation": "default",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "typeName": {
                        "id": 10142,
                        "name": "uint",
                        "nodeType": "ElementaryTypeName",
                        "src": "934:4:24",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "value": null,
                      "visibility": "internal"
                    }
                  ],
                  "id": 10149,
                  "initialValue": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 10148,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 10146,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 10144,
                        "name": "cash",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10131,
                        "src": "947:4:24",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "+",
                      "rightExpression": {
                        "argumentTypes": null,
                        "id": 10145,
                        "name": "borrows",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10133,
                        "src": "954:7:24",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "src": "947:14:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "+",
                    "rightExpression": {
                      "argumentTypes": null,
                      "id": 10147,
                      "name": "reserves",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10135,
                      "src": "964:8:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "947:25:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "nodeType": "VariableDeclarationStatement",
                  "src": "934:38:24"
                },
                {
                  "expression": {
                    "argumentTypes": null,
                    "id": 10152,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftHandSide": {
                      "argumentTypes": null,
                      "id": 10150,
                      "name": "success",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10138,
                      "src": "982:7:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "Assignment",
                    "operator": "=",
                    "rightHandSide": {
                      "argumentTypes": null,
                      "hexValue": "30",
                      "id": 10151,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": true,
                      "kind": "number",
                      "lValueRequested": false,
                      "nodeType": "Literal",
                      "src": "992:1:24",
                      "subdenomination": null,
                      "typeDescriptions": {
                        "typeIdentifier": "t_rational_0_by_1",
                        "typeString": "int_const 0"
                      },
                      "value": "0"
                    },
                    "src": "982:11:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "id": 10153,
                  "nodeType": "ExpressionStatement",
                  "src": "982:11:24"
                },
                {
                  "condition": {
                    "argumentTypes": null,
                    "commonType": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    },
                    "id": 10158,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": false,
                    "lValueRequested": false,
                    "leftExpression": {
                      "argumentTypes": null,
                      "id": 10154,
                      "name": "borrows",
                      "nodeType": "Identifier",
                      "overloadedDeclarations": [],
                      "referencedDeclaration": 10133,
                      "src": "1007:7:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "nodeType": "BinaryOperation",
                    "operator": "<=",
                    "rightExpression": {
                      "argumentTypes": null,
                      "commonType": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      },
                      "id": 10157,
                      "isConstant": false,
                      "isLValue": false,
                      "isPure": false,
                      "lValueRequested": false,
                      "leftExpression": {
                        "argumentTypes": null,
                        "id": 10155,
                        "name": "total",
                        "nodeType": "Identifier",
                        "overloadedDeclarations": [],
                        "referencedDeclaration": 10143,
                        "src": "1018:5:24",
                        "typeDescriptions": {
                          "typeIdentifier": "t_uint256",
                          "typeString": "uint256"
                        }
                      },
                      "nodeType": "BinaryOperation",
                      "operator": "/",
                      "rightExpression": {
                        "argumentTypes": null,
                        "hexValue": "32",
                        "id": 10156,
                        "isConstant": false,
                        "isLValue": false,
                        "isPure": true,
                        "kind": "number",
                        "lValueRequested": false,
                        "nodeType": "Literal",
                        "src": "1026:1:24",
                        "subdenomination": null,
                        "typeDescriptions": {
                          "typeIdentifier": "t_rational_2_by_1",
                          "typeString": "int_const 2"
                        },
                        "value": "2"
                      },
                      "src": "1018:9:24",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint256",
                        "typeString": "uint256"
                      }
                    },
                    "src": "1007:20:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "falseBody": {
                    "id": 10168,
                    "nodeType": "Block",
                    "src": "1133:102:24",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 10166,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 10164,
                            "name": "rate",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10140,
                            "src": "1177:4:24",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "3130303030303030303030303030",
                            "id": 10165,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1184:14:24",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_10000000000000_by_1",
                              "typeString": "int_const 10000000000000"
                            },
                            "value": "10000000000000"
                          },
                          "src": "1177:21:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 10167,
                        "nodeType": "ExpressionStatement",
                        "src": "1177:21:24"
                      }
                    ]
                  },
                  "id": 10169,
                  "nodeType": "IfStatement",
                  "src": "1003:232:24",
                  "trueBody": {
                    "id": 10163,
                    "nodeType": "Block",
                    "src": "1029:98:24",
                    "statements": [
                      {
                        "expression": {
                          "argumentTypes": null,
                          "id": 10161,
                          "isConstant": false,
                          "isLValue": false,
                          "isPure": false,
                          "lValueRequested": false,
                          "leftHandSide": {
                            "argumentTypes": null,
                            "id": 10159,
                            "name": "rate",
                            "nodeType": "Identifier",
                            "overloadedDeclarations": [],
                            "referencedDeclaration": 10140,
                            "src": "1069:4:24",
                            "typeDescriptions": {
                              "typeIdentifier": "t_uint256",
                              "typeString": "uint256"
                            }
                          },
                          "nodeType": "Assignment",
                          "operator": "=",
                          "rightHandSide": {
                            "argumentTypes": null,
                            "hexValue": "31303030303030303030303030",
                            "id": 10160,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "1076:13:24",
                            "subdenomination": null,
                            "typeDescriptions": {
                              "typeIdentifier": "t_rational_1000000000000_by_1",
                              "typeString": "int_const 1000000000000"
                            },
                            "value": "1000000000000"
                          },
                          "src": "1069:20:24",
                          "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                          }
                        },
                        "id": 10162,
                        "nodeType": "ExpressionStatement",
                        "src": "1069:20:24"
                      }
                    ]
                  }
                }
              ]
            },
            "documentation": "@notice Gets the current borrow interest rate based on the given asset, total cash, total borrows\n        and total reserves.\n@dev The return value should be scaled by 1e18, thus a return value of\n     `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per block*.\n@param cash The total cash of the underlying asset in the CToken\n@param borrows The total borrows of the underlying asset in the CToken\n@param reserves The total reserves of the underlying asset in the CToken\n@return Success or failure and the borrow interest rate per block scaled by 10e18",
            "id": 10171,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "getBorrowRate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10136,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10131,
                  "name": "cash",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "824:9:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10130,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "824:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 10133,
                  "name": "borrows",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "835:12:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10132,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "835:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 10135,
                  "name": "reserves",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "849:13:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10134,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "849:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "823:40:24"
            },
            "returnParameters": {
              "id": 10141,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10138,
                  "name": "success",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "899:12:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10137,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "899:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 10140,
                  "name": "rate",
                  "nodeType": "VariableDeclaration",
                  "scope": 10171,
                  "src": "913:9:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 10139,
                    "name": "uint",
                    "nodeType": "ElementaryTypeName",
                    "src": "913:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "898:25:24"
            },
            "scope": 10180,
            "src": "801:440:24",
            "stateMutability": "view",
            "superFunction": 5813,
            "visibility": "external"
          },
          {
            "body": {
              "id": 10178,
              "nodeType": "Block",
              "src": "1307:16:24",
              "statements": [
                {
                  "expression": {
                    "argumentTypes": null,
                    "hexValue": "74727565",
                    "id": 10176,
                    "isConstant": false,
                    "isLValue": false,
                    "isPure": true,
                    "kind": "bool",
                    "lValueRequested": false,
                    "nodeType": "Literal",
                    "src": "1316:4:24",
                    "subdenomination": null,
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    },
                    "value": "true"
                  },
                  "functionReturnParameters": 10175,
                  "id": 10177,
                  "nodeType": "Return",
                  "src": "1309:11:24"
                }
              ]
            },
            "documentation": null,
            "id": 10179,
            "implemented": true,
            "kind": "function",
            "modifiers": [],
            "name": "isInterestRateModel",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 10172,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1275:2:24"
            },
            "returnParameters": {
              "id": 10175,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 10174,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 10179,
                  "src": "1301:4:24",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 10173,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "1301:4:24",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1300:6:24"
            },
            "scope": 10180,
            "src": "1247:76:24",
            "stateMutability": "view",
            "superFunction": 5818,
            "visibility": "external"
          }
        ],
        "scope": 10181,
        "src": "83:1243:24"
      }
    ],
    "src": "0:1327:24"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.12+commit.7709ece9.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.21",
  "updatedAt": "2020-04-22T17:31:54.560Z",
  "devdoc": {
    "methods": {
      "getBorrowRate(uint256,uint256,uint256)": {
        "details": "The return value should be scaled by 1e18, thus a return value of     `(true, 1000000000000)` implies an interest rate of 0.000001 or 0.0001% *per block*.",
        "params": {
          "borrows": "The total borrows of the underlying asset in the CToken",
          "cash": "The total cash of the underlying asset in the CToken",
          "reserves": "The total reserves of the underlying asset in the CToken"
        },
        "return": "Success or failure and the borrow interest rate per block scaled by 10e18"
      }
    }
  },
  "userdoc": {
    "methods": {
      "getBorrowRate(uint256,uint256,uint256)": {
        "notice": "Gets the current borrow interest rate based on the given asset, total cash, total borrows        and total reserves."
      }
    }
  }
}