{
    "contractName": "KollateralInvokable",
    "abi": [
        {
            "stateMutability": "payable",
            "type": "fallback"
        },
        {
            "inputs": [
                {
                    "internalType": "bytes",
                    "name": "data",
                    "type": "bytes"
                }
            ],
            "name": "execute",
            "outputs": [],
            "stateMutability": "payable",
            "type": "function"
        },
        {
            "stateMutability": "payable",
            "type": "receive"
        }
    ],
    "metadata": "{\"compiler\":{\"version\":\"0.7.3+commit.9bfce1f6\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"execute\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/KollateralInvokable.sol\":\"KollateralInvokable\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/IInvocationHook.sol\":{\"keccak256\":\"0x36fb31db8a8e7eed7038b37554582655826969a556005d8ee3ab5070fe034860\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://e0dde70be03ea1e086a5bce0d3a7bb1ac65549eab7ea2618343255332edddca7\",\"dweb:/ipfs/QmVaQG686g3tbgM3L3mtw4ei1WxzcDRcS9UxipSt4KCYs1\"]},\"/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/IInvokable.sol\":{\"keccak256\":\"0x372bca80a3e9d20439e9bf88cc026d6d1ec01556463e902511c67b6fc92e12d5\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://a5e6b5ef4246d03871bbd44b34e1212a9567d963f1b1e8e58e6273709442d4fb\",\"dweb:/ipfs/Qmb5Es45FLS4hhNGb9md3KU7L7hyMW7HHzumrVfsZZgxgC\"]},\"/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/KollateralInvokable.sol\":{\"keccak256\":\"0x4b02498b78045bba86ea077b47f9fc10714e0a8f17a9bca0498dac1b7b7dadac\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://beb241b55d91c474fb08119c4f4ddf92fa2fffb2a3f811d76511341880b70e8c\",\"dweb:/ipfs/QmdxtYC83A8Axn2XuJZcmE3RzEFxKXu7SSbvVoqCMydgYA\"]},\"/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/BalanceCarrier.sol\":{\"keccak256\":\"0x69e63e482d839c831c8c32f002e6454f6a8d9e602b39e9cdc1c0649451df3337\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://0a40661372b8f95cbed7714a16323b435ccbe85205178d32bc6012e47bfc0640\",\"dweb:/ipfs/QmTyHr1Ag4AkcyazzTT5GDcWabAMHPTrELoGhL85ZWDgBy\"]},\"/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/ExternalCaller.sol\":{\"keccak256\":\"0x54f88a1f0ac5dd7ab99a0519124cb09f1e19b4efb9baf240bc2500f8caa0b4ff\",\"license\":\"Apache-2.0\",\"urls\":[\"bzz-raw://3170671378d20b47498224d065e33fccc223ae772d7f0af2c5ef314f94b75c98\",\"dweb:/ipfs/Qme8ZEEBnBG5Vvj8uyJCD2YVPcLx6funKsSSCpGkTyn1zi\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0xba96bc371ba999f452985a98717cca1e4c4abb598dc038a9a9c3db08129b1ba4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://26e50e3f7b6482fb6f598f2e006994a74aa492687daa4b3eee7fd4fb5398ce7f\",\"dweb:/ipfs/QmZudqoPSkA4USLMFsBBmt19dDPZFS8aaAmL5R7pECXu6t\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xbd74f587ab9b9711801baf667db1426e4a03fd2d7f15af33e0e0d0394e7cef76\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2d0913dfbfce90d170df0d496ad7596c0778518e5fa7aba6c32562522546f66b\",\"dweb:/ipfs/QmR6B8nLj2PJf5e1JWD9Nk7ErkAwkqUwadCnvE82FJr1RU\"]}},\"version\":1}",
    "bytecode": "0x",
    "deployedBytecode": "0x",
    "immutableReferences": {},
    "generatedSources": [],
    "deployedGeneratedSources": [],
    "sourceMap": "",
    "deployedSourceMap": "",
    "source": "/*\n\n    Copyright 2020 Kollateral LLC.\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n\n*/\n\n// SPDX-License-Identifier: Apache-2.0\npragma solidity ^0.7.0;\n\nimport \"../utils/BalanceCarrier.sol\";\nimport \"./IInvocationHook.sol\";\nimport \"./IInvokable.sol\";\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\n\nabstract contract KollateralInvokable is IInvokable, BalanceCarrier {\n    using SafeMath for uint256;\n\n    uint256 internal MAX_REWARD_BIPS = 100;\n\n    constructor() BalanceCarrier(address(1)) {}\n\n    receive() external payable {}\n\n    fallback() external payable {}\n\n    function repay() internal repaymentSafeguard {\n        require(\n            transfer(\n                currentTokenAddress(),\n                msg.sender,\n                currentRepaymentAmount()\n            ),\n            \"KollateralInvokable: failed to repay\"\n        );\n    }\n\n    function currentSender() internal view returns (address) {\n        return IInvocationHook(msg.sender).currentSender();\n    }\n\n    function currentTokenAddress() internal view returns (address) {\n        return IInvocationHook(msg.sender).currentTokenAddress();\n    }\n\n    function currentTokenAmount() internal view returns (uint256) {\n        return IInvocationHook(msg.sender).currentTokenAmount();\n    }\n\n    function currentRepaymentAmount() internal view returns (uint256) {\n        return IInvocationHook(msg.sender).currentRepaymentAmount();\n    }\n\n    function isCurrentTokenEther() internal view returns (bool) {\n        return currentTokenAddress() == address(1);\n    }\n\n    modifier repaymentSafeguard() {\n        uint256 effectiveReward = currentRepaymentAmount()\n            .sub(currentTokenAmount())\n            .mul(10000)\n            .div(currentTokenAmount());\n\n        require(\n            effectiveReward <= MAX_REWARD_BIPS,\n            \"KollateralInvokable: repayment reward too high\"\n        );\n\n        _;\n    }\n}\n",
    "sourcePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/KollateralInvokable.sol",
    "ast": {
        "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/KollateralInvokable.sol",
        "exportedSymbols": {
            "BalanceCarrier": [
                1464
            ],
            "ExternalCaller": [
                1563
            ],
            "IERC20": [
                6165
            ],
            "IInvocationHook": [
                1170
            ],
            "IInvokable": [
                1178
            ],
            "KollateralInvokable": [
                1380
            ],
            "SafeMath": [
                5584
            ]
        },
        "id": 1381,
        "license": "Apache-2.0",
        "nodeType": "SourceUnit",
        "nodes": [
            {
                "id": 1236,
                "literals": [
                    "solidity",
                    "^",
                    "0.7",
                    ".0"
                ],
                "nodeType": "PragmaDirective",
                "src": "640:23:5"
            },
            {
                "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/BalanceCarrier.sol",
                "file": "../utils/BalanceCarrier.sol",
                "id": 1237,
                "nodeType": "ImportDirective",
                "scope": 1381,
                "sourceUnit": 1465,
                "src": "665:37:5",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/IInvocationHook.sol",
                "file": "./IInvocationHook.sol",
                "id": 1238,
                "nodeType": "ImportDirective",
                "scope": 1381,
                "sourceUnit": 1171,
                "src": "703:31:5",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/IInvokable.sol",
                "file": "./IInvokable.sol",
                "id": 1239,
                "nodeType": "ImportDirective",
                "scope": 1381,
                "sourceUnit": 1179,
                "src": "735:26:5",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
                "file": "@openzeppelin/contracts/math/SafeMath.sol",
                "id": 1240,
                "nodeType": "ImportDirective",
                "scope": 1381,
                "sourceUnit": 5585,
                "src": "762:51:5",
                "symbolAliases": [],
                "unitAlias": ""
            },
            {
                "abstract": true,
                "baseContracts": [
                    {
                        "baseName": {
                            "id": 1241,
                            "name": "IInvokable",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 1178,
                            "src": "856:10:5",
                            "typeDescriptions": {
                                "typeIdentifier": "t_contract$_IInvokable_$1178",
                                "typeString": "contract IInvokable"
                            }
                        },
                        "id": 1242,
                        "nodeType": "InheritanceSpecifier",
                        "src": "856:10:5"
                    },
                    {
                        "baseName": {
                            "id": 1243,
                            "name": "BalanceCarrier",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 1464,
                            "src": "868:14:5",
                            "typeDescriptions": {
                                "typeIdentifier": "t_contract$_BalanceCarrier_$1464",
                                "typeString": "contract BalanceCarrier"
                            }
                        },
                        "id": 1244,
                        "nodeType": "InheritanceSpecifier",
                        "src": "868:14:5"
                    }
                ],
                "contractDependencies": [
                    1178,
                    1464,
                    1563
                ],
                "contractKind": "contract",
                "fullyImplemented": false,
                "id": 1380,
                "linearizedBaseContracts": [
                    1380,
                    1464,
                    1563,
                    1178
                ],
                "name": "KollateralInvokable",
                "nodeType": "ContractDefinition",
                "nodes": [
                    {
                        "id": 1247,
                        "libraryName": {
                            "id": 1245,
                            "name": "SafeMath",
                            "nodeType": "UserDefinedTypeName",
                            "referencedDeclaration": 5584,
                            "src": "895:8:5",
                            "typeDescriptions": {
                                "typeIdentifier": "t_contract$_SafeMath_$5584",
                                "typeString": "library SafeMath"
                            }
                        },
                        "nodeType": "UsingForDirective",
                        "src": "889:27:5",
                        "typeName": {
                            "id": 1246,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "908:7:5",
                            "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                            }
                        }
                    },
                    {
                        "constant": false,
                        "id": 1250,
                        "mutability": "mutable",
                        "name": "MAX_REWARD_BIPS",
                        "nodeType": "VariableDeclaration",
                        "scope": 1380,
                        "src": "922:38:5",
                        "stateVariable": true,
                        "storageLocation": "default",
                        "typeDescriptions": {
                            "typeIdentifier": "t_uint256",
                            "typeString": "uint256"
                        },
                        "typeName": {
                            "id": 1248,
                            "name": "uint256",
                            "nodeType": "ElementaryTypeName",
                            "src": "922:7:5",
                            "typeDescriptions": {
                                "typeIdentifier": "t_uint256",
                                "typeString": "uint256"
                            }
                        },
                        "value": {
                            "hexValue": "313030",
                            "id": 1249,
                            "isConstant": false,
                            "isLValue": false,
                            "isPure": true,
                            "kind": "number",
                            "lValueRequested": false,
                            "nodeType": "Literal",
                            "src": "957:3:5",
                            "typeDescriptions": {
                                "typeIdentifier": "t_rational_100_by_1",
                                "typeString": "int_const 100"
                            },
                            "value": "100"
                        },
                        "visibility": "internal"
                    },
                    {
                        "body": {
                            "id": 1259,
                            "nodeType": "Block",
                            "src": "1008:2:5",
                            "statements": []
                        },
                        "id": 1260,
                        "implemented": true,
                        "kind": "constructor",
                        "modifiers": [
                            {
                                "arguments": [
                                    {
                                        "arguments": [
                                            {
                                                "hexValue": "31",
                                                "id": 1255,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "kind": "number",
                                                "lValueRequested": false,
                                                "nodeType": "Literal",
                                                "src": "1004:1:5",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_rational_1_by_1",
                                                    "typeString": "int_const 1"
                                                },
                                                "value": "1"
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_rational_1_by_1",
                                                    "typeString": "int_const 1"
                                                }
                                            ],
                                            "id": 1254,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "lValueRequested": false,
                                            "nodeType": "ElementaryTypeNameExpression",
                                            "src": "996:7:5",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_type$_t_address_$",
                                                "typeString": "type(address)"
                                            },
                                            "typeName": {
                                                "id": 1253,
                                                "name": "address",
                                                "nodeType": "ElementaryTypeName",
                                                "src": "996:7:5",
                                                "typeDescriptions": {}
                                            }
                                        },
                                        "id": 1256,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": true,
                                        "kind": "typeConversion",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "996:10:5",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address_payable",
                                            "typeString": "address payable"
                                        }
                                    }
                                ],
                                "id": 1257,
                                "modifierName": {
                                    "id": 1252,
                                    "name": "BalanceCarrier",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1464,
                                    "src": "981:14:5",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_type$_t_contract$_BalanceCarrier_$1464_$",
                                        "typeString": "type(contract BalanceCarrier)"
                                    }
                                },
                                "nodeType": "ModifierInvocation",
                                "src": "981:26:5"
                            }
                        ],
                        "name": "",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1251,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "978:2:5"
                        },
                        "returnParameters": {
                            "id": 1258,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1008:0:5"
                        },
                        "scope": 1380,
                        "src": "967:43:5",
                        "stateMutability": "nonpayable",
                        "virtual": false,
                        "visibility": "internal"
                    },
                    {
                        "body": {
                            "id": 1263,
                            "nodeType": "Block",
                            "src": "1043:2:5",
                            "statements": []
                        },
                        "id": 1264,
                        "implemented": true,
                        "kind": "receive",
                        "modifiers": [],
                        "name": "",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1261,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1023:2:5"
                        },
                        "returnParameters": {
                            "id": 1262,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1043:0:5"
                        },
                        "scope": 1380,
                        "src": "1016:29:5",
                        "stateMutability": "payable",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "body": {
                            "id": 1267,
                            "nodeType": "Block",
                            "src": "1079:2:5",
                            "statements": []
                        },
                        "id": 1268,
                        "implemented": true,
                        "kind": "fallback",
                        "modifiers": [],
                        "name": "",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1265,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1059:2:5"
                        },
                        "returnParameters": {
                            "id": 1266,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1079:0:5"
                        },
                        "scope": 1380,
                        "src": "1051:30:5",
                        "stateMutability": "payable",
                        "virtual": false,
                        "visibility": "external"
                    },
                    {
                        "body": {
                            "id": 1285,
                            "nodeType": "Block",
                            "src": "1132:231:5",
                            "statements": [
                                {
                                    "expression": {
                                        "arguments": [
                                            {
                                                "arguments": [
                                                    {
                                                        "arguments": [],
                                                        "expression": {
                                                            "argumentTypes": [],
                                                            "id": 1275,
                                                            "name": "currentTokenAddress",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 1312,
                                                            "src": "1189:19:5",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                                                "typeString": "function () view returns (address)"
                                                            }
                                                        },
                                                        "id": 1276,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "kind": "functionCall",
                                                        "lValueRequested": false,
                                                        "names": [],
                                                        "nodeType": "FunctionCall",
                                                        "src": "1189:21:5",
                                                        "tryCall": false,
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address",
                                                            "typeString": "address"
                                                        }
                                                    },
                                                    {
                                                        "expression": {
                                                            "id": 1277,
                                                            "name": "msg",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": -15,
                                                            "src": "1228:3:5",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_magic_message",
                                                                "typeString": "msg"
                                                            }
                                                        },
                                                        "id": 1278,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "sender",
                                                        "nodeType": "MemberAccess",
                                                        "src": "1228:10:5",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    },
                                                    {
                                                        "arguments": [],
                                                        "expression": {
                                                            "argumentTypes": [],
                                                            "id": 1279,
                                                            "name": "currentRepaymentAmount",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": 1338,
                                                            "src": "1256:22:5",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                                                "typeString": "function () view returns (uint256)"
                                                            }
                                                        },
                                                        "id": 1280,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "kind": "functionCall",
                                                        "lValueRequested": false,
                                                        "names": [],
                                                        "nodeType": "FunctionCall",
                                                        "src": "1256:24:5",
                                                        "tryCall": false,
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_uint256",
                                                            "typeString": "uint256"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_address",
                                                            "typeString": "address"
                                                        },
                                                        {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        },
                                                        {
                                                            "typeIdentifier": "t_uint256",
                                                            "typeString": "uint256"
                                                        }
                                                    ],
                                                    "id": 1274,
                                                    "name": "transfer",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1433,
                                                    "src": "1163:8:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_address_$_t_uint256_$returns$_t_bool_$",
                                                        "typeString": "function (address,address,uint256) returns (bool)"
                                                    }
                                                },
                                                "id": 1281,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "1163:131:5",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                }
                                            },
                                            {
                                                "hexValue": "4b6f6c6c61746572616c496e766f6b61626c653a206661696c656420746f207265706179",
                                                "id": 1282,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "kind": "string",
                                                "lValueRequested": false,
                                                "nodeType": "Literal",
                                                "src": "1308:38:5",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_stringliteral_25039293441dc3e8232a383779798de2494653a268629a0301d0a232553a467e",
                                                    "typeString": "literal_string \"KollateralInvokable: failed to repay\""
                                                },
                                                "value": "KollateralInvokable: failed to repay"
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                },
                                                {
                                                    "typeIdentifier": "t_stringliteral_25039293441dc3e8232a383779798de2494653a268629a0301d0a232553a467e",
                                                    "typeString": "literal_string \"KollateralInvokable: failed to repay\""
                                                }
                                            ],
                                            "id": 1273,
                                            "name": "require",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [
                                                -18,
                                                -18
                                            ],
                                            "referencedDeclaration": -18,
                                            "src": "1142:7:5",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                                                "typeString": "function (bool,string memory) pure"
                                            }
                                        },
                                        "id": 1283,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "1142:214:5",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_tuple$__$",
                                            "typeString": "tuple()"
                                        }
                                    },
                                    "id": 1284,
                                    "nodeType": "ExpressionStatement",
                                    "src": "1142:214:5"
                                }
                            ]
                        },
                        "id": 1286,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [
                            {
                                "id": 1271,
                                "modifierName": {
                                    "id": 1270,
                                    "name": "repaymentSafeguard",
                                    "nodeType": "Identifier",
                                    "overloadedDeclarations": [],
                                    "referencedDeclaration": 1379,
                                    "src": "1113:18:5",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_modifier$__$",
                                        "typeString": "modifier ()"
                                    }
                                },
                                "nodeType": "ModifierInvocation",
                                "src": "1113:18:5"
                            }
                        ],
                        "name": "repay",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1269,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1101:2:5"
                        },
                        "returnParameters": {
                            "id": 1272,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1132:0:5"
                        },
                        "scope": 1380,
                        "src": "1087:276:5",
                        "stateMutability": "nonpayable",
                        "virtual": false,
                        "visibility": "internal"
                    },
                    {
                        "body": {
                            "id": 1298,
                            "nodeType": "Block",
                            "src": "1426:67:5",
                            "statements": [
                                {
                                    "expression": {
                                        "arguments": [],
                                        "expression": {
                                            "argumentTypes": [],
                                            "expression": {
                                                "arguments": [
                                                    {
                                                        "expression": {
                                                            "id": 1292,
                                                            "name": "msg",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": -15,
                                                            "src": "1459:3:5",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_magic_message",
                                                                "typeString": "msg"
                                                            }
                                                        },
                                                        "id": 1293,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "sender",
                                                        "nodeType": "MemberAccess",
                                                        "src": "1459:10:5",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    ],
                                                    "id": 1291,
                                                    "name": "IInvocationHook",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1170,
                                                    "src": "1443:15:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_type$_t_contract$_IInvocationHook_$1170_$",
                                                        "typeString": "type(contract IInvocationHook)"
                                                    }
                                                },
                                                "id": 1294,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "typeConversion",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "1443:27:5",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_IInvocationHook_$1170",
                                                    "typeString": "contract IInvocationHook"
                                                }
                                            },
                                            "id": 1295,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "currentSender",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1154,
                                            "src": "1443:41:5",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                                                "typeString": "function () view external returns (address)"
                                            }
                                        },
                                        "id": 1296,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "1443:43:5",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "functionReturnParameters": 1290,
                                    "id": 1297,
                                    "nodeType": "Return",
                                    "src": "1436:50:5"
                                }
                            ]
                        },
                        "id": 1299,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [],
                        "name": "currentSender",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1287,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1391:2:5"
                        },
                        "returnParameters": {
                            "id": 1290,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 1289,
                                    "mutability": "mutable",
                                    "name": "",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 1299,
                                    "src": "1417:7:5",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 1288,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1417:7:5",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "1416:9:5"
                        },
                        "scope": 1380,
                        "src": "1369:124:5",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "internal"
                    },
                    {
                        "body": {
                            "id": 1311,
                            "nodeType": "Block",
                            "src": "1562:73:5",
                            "statements": [
                                {
                                    "expression": {
                                        "arguments": [],
                                        "expression": {
                                            "argumentTypes": [],
                                            "expression": {
                                                "arguments": [
                                                    {
                                                        "expression": {
                                                            "id": 1305,
                                                            "name": "msg",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": -15,
                                                            "src": "1595:3:5",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_magic_message",
                                                                "typeString": "msg"
                                                            }
                                                        },
                                                        "id": 1306,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "sender",
                                                        "nodeType": "MemberAccess",
                                                        "src": "1595:10:5",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    ],
                                                    "id": 1304,
                                                    "name": "IInvocationHook",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1170,
                                                    "src": "1579:15:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_type$_t_contract$_IInvocationHook_$1170_$",
                                                        "typeString": "type(contract IInvocationHook)"
                                                    }
                                                },
                                                "id": 1307,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "typeConversion",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "1579:27:5",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_IInvocationHook_$1170",
                                                    "typeString": "contract IInvocationHook"
                                                }
                                            },
                                            "id": 1308,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "currentTokenAddress",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1159,
                                            "src": "1579:47:5",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_view$__$returns$_t_address_$",
                                                "typeString": "function () view external returns (address)"
                                            }
                                        },
                                        "id": 1309,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "1579:49:5",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "functionReturnParameters": 1303,
                                    "id": 1310,
                                    "nodeType": "Return",
                                    "src": "1572:56:5"
                                }
                            ]
                        },
                        "id": 1312,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [],
                        "name": "currentTokenAddress",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1300,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1527:2:5"
                        },
                        "returnParameters": {
                            "id": 1303,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 1302,
                                    "mutability": "mutable",
                                    "name": "",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 1312,
                                    "src": "1553:7:5",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_address",
                                        "typeString": "address"
                                    },
                                    "typeName": {
                                        "id": 1301,
                                        "name": "address",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1553:7:5",
                                        "stateMutability": "nonpayable",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "1552:9:5"
                        },
                        "scope": 1380,
                        "src": "1499:136:5",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "internal"
                    },
                    {
                        "body": {
                            "id": 1324,
                            "nodeType": "Block",
                            "src": "1703:72:5",
                            "statements": [
                                {
                                    "expression": {
                                        "arguments": [],
                                        "expression": {
                                            "argumentTypes": [],
                                            "expression": {
                                                "arguments": [
                                                    {
                                                        "expression": {
                                                            "id": 1318,
                                                            "name": "msg",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": -15,
                                                            "src": "1736:3:5",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_magic_message",
                                                                "typeString": "msg"
                                                            }
                                                        },
                                                        "id": 1319,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "sender",
                                                        "nodeType": "MemberAccess",
                                                        "src": "1736:10:5",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    ],
                                                    "id": 1317,
                                                    "name": "IInvocationHook",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1170,
                                                    "src": "1720:15:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_type$_t_contract$_IInvocationHook_$1170_$",
                                                        "typeString": "type(contract IInvocationHook)"
                                                    }
                                                },
                                                "id": 1320,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "typeConversion",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "1720:27:5",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_IInvocationHook_$1170",
                                                    "typeString": "contract IInvocationHook"
                                                }
                                            },
                                            "id": 1321,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "currentTokenAmount",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1164,
                                            "src": "1720:46:5",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                                "typeString": "function () view external returns (uint256)"
                                            }
                                        },
                                        "id": 1322,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "1720:48:5",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "functionReturnParameters": 1316,
                                    "id": 1323,
                                    "nodeType": "Return",
                                    "src": "1713:55:5"
                                }
                            ]
                        },
                        "id": 1325,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [],
                        "name": "currentTokenAmount",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1313,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1668:2:5"
                        },
                        "returnParameters": {
                            "id": 1316,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 1315,
                                    "mutability": "mutable",
                                    "name": "",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 1325,
                                    "src": "1694:7:5",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    },
                                    "typeName": {
                                        "id": 1314,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1694:7:5",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "1693:9:5"
                        },
                        "scope": 1380,
                        "src": "1641:134:5",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "internal"
                    },
                    {
                        "body": {
                            "id": 1337,
                            "nodeType": "Block",
                            "src": "1847:76:5",
                            "statements": [
                                {
                                    "expression": {
                                        "arguments": [],
                                        "expression": {
                                            "argumentTypes": [],
                                            "expression": {
                                                "arguments": [
                                                    {
                                                        "expression": {
                                                            "id": 1331,
                                                            "name": "msg",
                                                            "nodeType": "Identifier",
                                                            "overloadedDeclarations": [],
                                                            "referencedDeclaration": -15,
                                                            "src": "1880:3:5",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_magic_message",
                                                                "typeString": "msg"
                                                            }
                                                        },
                                                        "id": 1332,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "lValueRequested": false,
                                                        "memberName": "sender",
                                                        "nodeType": "MemberAccess",
                                                        "src": "1880:10:5",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_address_payable",
                                                            "typeString": "address payable"
                                                        }
                                                    ],
                                                    "id": 1330,
                                                    "name": "IInvocationHook",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1170,
                                                    "src": "1864:15:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_type$_t_contract$_IInvocationHook_$1170_$",
                                                        "typeString": "type(contract IInvocationHook)"
                                                    }
                                                },
                                                "id": 1333,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "typeConversion",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "1864:27:5",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_contract$_IInvocationHook_$1170",
                                                    "typeString": "contract IInvocationHook"
                                                }
                                            },
                                            "id": 1334,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "currentRepaymentAmount",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 1169,
                                            "src": "1864:50:5",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_external_view$__$returns$_t_uint256_$",
                                                "typeString": "function () view external returns (uint256)"
                                            }
                                        },
                                        "id": 1335,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "1864:52:5",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "functionReturnParameters": 1329,
                                    "id": 1336,
                                    "nodeType": "Return",
                                    "src": "1857:59:5"
                                }
                            ]
                        },
                        "id": 1338,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [],
                        "name": "currentRepaymentAmount",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1326,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1812:2:5"
                        },
                        "returnParameters": {
                            "id": 1329,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 1328,
                                    "mutability": "mutable",
                                    "name": "",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 1338,
                                    "src": "1838:7:5",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_uint256",
                                        "typeString": "uint256"
                                    },
                                    "typeName": {
                                        "id": 1327,
                                        "name": "uint256",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1838:7:5",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "1837:9:5"
                        },
                        "scope": 1380,
                        "src": "1781:142:5",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "internal"
                    },
                    {
                        "body": {
                            "id": 1351,
                            "nodeType": "Block",
                            "src": "1989:59:5",
                            "statements": [
                                {
                                    "expression": {
                                        "commonType": {
                                            "typeIdentifier": "t_address",
                                            "typeString": "address"
                                        },
                                        "id": 1349,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "lValueRequested": false,
                                        "leftExpression": {
                                            "arguments": [],
                                            "expression": {
                                                "argumentTypes": [],
                                                "id": 1343,
                                                "name": "currentTokenAddress",
                                                "nodeType": "Identifier",
                                                "overloadedDeclarations": [],
                                                "referencedDeclaration": 1312,
                                                "src": "2006:19:5",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_function_internal_view$__$returns$_t_address_$",
                                                    "typeString": "function () view returns (address)"
                                                }
                                            },
                                            "id": 1344,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "kind": "functionCall",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "2006:21:5",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_address",
                                                "typeString": "address"
                                            }
                                        },
                                        "nodeType": "BinaryOperation",
                                        "operator": "==",
                                        "rightExpression": {
                                            "arguments": [
                                                {
                                                    "hexValue": "31",
                                                    "id": 1347,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": true,
                                                    "kind": "number",
                                                    "lValueRequested": false,
                                                    "nodeType": "Literal",
                                                    "src": "2039:1:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_rational_1_by_1",
                                                        "typeString": "int_const 1"
                                                    },
                                                    "value": "1"
                                                }
                                            ],
                                            "expression": {
                                                "argumentTypes": [
                                                    {
                                                        "typeIdentifier": "t_rational_1_by_1",
                                                        "typeString": "int_const 1"
                                                    }
                                                ],
                                                "id": 1346,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "lValueRequested": false,
                                                "nodeType": "ElementaryTypeNameExpression",
                                                "src": "2031:7:5",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_type$_t_address_$",
                                                    "typeString": "type(address)"
                                                },
                                                "typeName": {
                                                    "id": 1345,
                                                    "name": "address",
                                                    "nodeType": "ElementaryTypeName",
                                                    "src": "2031:7:5",
                                                    "typeDescriptions": {}
                                                }
                                            },
                                            "id": 1348,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "kind": "typeConversion",
                                            "lValueRequested": false,
                                            "names": [],
                                            "nodeType": "FunctionCall",
                                            "src": "2031:10:5",
                                            "tryCall": false,
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_address_payable",
                                                "typeString": "address payable"
                                            }
                                        },
                                        "src": "2006:35:5",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                        }
                                    },
                                    "functionReturnParameters": 1342,
                                    "id": 1350,
                                    "nodeType": "Return",
                                    "src": "1999:42:5"
                                }
                            ]
                        },
                        "id": 1352,
                        "implemented": true,
                        "kind": "function",
                        "modifiers": [],
                        "name": "isCurrentTokenEther",
                        "nodeType": "FunctionDefinition",
                        "parameters": {
                            "id": 1339,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "1957:2:5"
                        },
                        "returnParameters": {
                            "id": 1342,
                            "nodeType": "ParameterList",
                            "parameters": [
                                {
                                    "constant": false,
                                    "id": 1341,
                                    "mutability": "mutable",
                                    "name": "",
                                    "nodeType": "VariableDeclaration",
                                    "scope": 1352,
                                    "src": "1983:4:5",
                                    "stateVariable": false,
                                    "storageLocation": "default",
                                    "typeDescriptions": {
                                        "typeIdentifier": "t_bool",
                                        "typeString": "bool"
                                    },
                                    "typeName": {
                                        "id": 1340,
                                        "name": "bool",
                                        "nodeType": "ElementaryTypeName",
                                        "src": "1983:4:5",
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_bool",
                                            "typeString": "bool"
                                        }
                                    },
                                    "visibility": "internal"
                                }
                            ],
                            "src": "1982:6:5"
                        },
                        "scope": 1380,
                        "src": "1929:119:5",
                        "stateMutability": "view",
                        "virtual": false,
                        "visibility": "internal"
                    },
                    {
                        "body": {
                            "id": 1378,
                            "nodeType": "Block",
                            "src": "2084:319:5",
                            "statements": [
                                {
                                    "assignments": [
                                        1355
                                    ],
                                    "declarations": [
                                        {
                                            "constant": false,
                                            "id": 1355,
                                            "mutability": "mutable",
                                            "name": "effectiveReward",
                                            "nodeType": "VariableDeclaration",
                                            "scope": 1378,
                                            "src": "2094:23:5",
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_uint256",
                                                "typeString": "uint256"
                                            },
                                            "typeName": {
                                                "id": 1354,
                                                "name": "uint256",
                                                "nodeType": "ElementaryTypeName",
                                                "src": "2094:7:5",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            },
                                            "visibility": "internal"
                                        }
                                    ],
                                    "id": 1369,
                                    "initialValue": {
                                        "arguments": [
                                            {
                                                "arguments": [],
                                                "expression": {
                                                    "argumentTypes": [],
                                                    "id": 1366,
                                                    "name": "currentTokenAmount",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1325,
                                                    "src": "2225:18:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                                        "typeString": "function () view returns (uint256)"
                                                    }
                                                },
                                                "id": 1367,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "2225:20:5",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            ],
                                            "expression": {
                                                "arguments": [
                                                    {
                                                        "hexValue": "3130303030",
                                                        "id": 1363,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": true,
                                                        "kind": "number",
                                                        "lValueRequested": false,
                                                        "nodeType": "Literal",
                                                        "src": "2201:5:5",
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_rational_10000_by_1",
                                                            "typeString": "int_const 10000"
                                                        },
                                                        "value": "10000"
                                                    }
                                                ],
                                                "expression": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_rational_10000_by_1",
                                                            "typeString": "int_const 10000"
                                                        }
                                                    ],
                                                    "expression": {
                                                        "arguments": [
                                                            {
                                                                "arguments": [],
                                                                "expression": {
                                                                    "argumentTypes": [],
                                                                    "id": 1359,
                                                                    "name": "currentTokenAmount",
                                                                    "nodeType": "Identifier",
                                                                    "overloadedDeclarations": [],
                                                                    "referencedDeclaration": 1325,
                                                                    "src": "2162:18:5",
                                                                    "typeDescriptions": {
                                                                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                                                        "typeString": "function () view returns (uint256)"
                                                                    }
                                                                },
                                                                "id": 1360,
                                                                "isConstant": false,
                                                                "isLValue": false,
                                                                "isPure": false,
                                                                "kind": "functionCall",
                                                                "lValueRequested": false,
                                                                "names": [],
                                                                "nodeType": "FunctionCall",
                                                                "src": "2162:20:5",
                                                                "tryCall": false,
                                                                "typeDescriptions": {
                                                                    "typeIdentifier": "t_uint256",
                                                                    "typeString": "uint256"
                                                                }
                                                            }
                                                        ],
                                                        "expression": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_uint256",
                                                                    "typeString": "uint256"
                                                                }
                                                            ],
                                                            "expression": {
                                                                "arguments": [],
                                                                "expression": {
                                                                    "argumentTypes": [],
                                                                    "id": 1356,
                                                                    "name": "currentRepaymentAmount",
                                                                    "nodeType": "Identifier",
                                                                    "overloadedDeclarations": [],
                                                                    "referencedDeclaration": 1338,
                                                                    "src": "2120:22:5",
                                                                    "typeDescriptions": {
                                                                        "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$",
                                                                        "typeString": "function () view returns (uint256)"
                                                                    }
                                                                },
                                                                "id": 1357,
                                                                "isConstant": false,
                                                                "isLValue": false,
                                                                "isPure": false,
                                                                "kind": "functionCall",
                                                                "lValueRequested": false,
                                                                "names": [],
                                                                "nodeType": "FunctionCall",
                                                                "src": "2120:24:5",
                                                                "tryCall": false,
                                                                "typeDescriptions": {
                                                                    "typeIdentifier": "t_uint256",
                                                                    "typeString": "uint256"
                                                                }
                                                            },
                                                            "id": 1358,
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "lValueRequested": false,
                                                            "memberName": "sub",
                                                            "nodeType": "MemberAccess",
                                                            "referencedDeclaration": 5434,
                                                            "src": "2120:41:5",
                                                            "typeDescriptions": {
                                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                            }
                                                        },
                                                        "id": 1361,
                                                        "isConstant": false,
                                                        "isLValue": false,
                                                        "isPure": false,
                                                        "kind": "functionCall",
                                                        "lValueRequested": false,
                                                        "names": [],
                                                        "nodeType": "FunctionCall",
                                                        "src": "2120:63:5",
                                                        "tryCall": false,
                                                        "typeDescriptions": {
                                                            "typeIdentifier": "t_uint256",
                                                            "typeString": "uint256"
                                                        }
                                                    },
                                                    "id": 1362,
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "memberName": "mul",
                                                    "nodeType": "MemberAccess",
                                                    "referencedDeclaration": 5497,
                                                    "src": "2120:80:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                        "typeString": "function (uint256,uint256) pure returns (uint256)"
                                                    }
                                                },
                                                "id": 1364,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "kind": "functionCall",
                                                "lValueRequested": false,
                                                "names": [],
                                                "nodeType": "FunctionCall",
                                                "src": "2120:87:5",
                                                "tryCall": false,
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                }
                                            },
                                            "id": 1365,
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": false,
                                            "lValueRequested": false,
                                            "memberName": "div",
                                            "nodeType": "MemberAccess",
                                            "referencedDeclaration": 5514,
                                            "src": "2120:104:5",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$",
                                                "typeString": "function (uint256,uint256) pure returns (uint256)"
                                            }
                                        },
                                        "id": 1368,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "2120:126:5",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_uint256",
                                            "typeString": "uint256"
                                        }
                                    },
                                    "nodeType": "VariableDeclarationStatement",
                                    "src": "2094:152:5"
                                },
                                {
                                    "expression": {
                                        "arguments": [
                                            {
                                                "commonType": {
                                                    "typeIdentifier": "t_uint256",
                                                    "typeString": "uint256"
                                                },
                                                "id": 1373,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": false,
                                                "lValueRequested": false,
                                                "leftExpression": {
                                                    "id": 1371,
                                                    "name": "effectiveReward",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1355,
                                                    "src": "2278:15:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                "nodeType": "BinaryOperation",
                                                "operator": "<=",
                                                "rightExpression": {
                                                    "id": 1372,
                                                    "name": "MAX_REWARD_BIPS",
                                                    "nodeType": "Identifier",
                                                    "overloadedDeclarations": [],
                                                    "referencedDeclaration": 1250,
                                                    "src": "2297:15:5",
                                                    "typeDescriptions": {
                                                        "typeIdentifier": "t_uint256",
                                                        "typeString": "uint256"
                                                    }
                                                },
                                                "src": "2278:34:5",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                }
                                            },
                                            {
                                                "hexValue": "4b6f6c6c61746572616c496e766f6b61626c653a2072657061796d656e742072657761726420746f6f2068696768",
                                                "id": 1374,
                                                "isConstant": false,
                                                "isLValue": false,
                                                "isPure": true,
                                                "kind": "string",
                                                "lValueRequested": false,
                                                "nodeType": "Literal",
                                                "src": "2326:48:5",
                                                "typeDescriptions": {
                                                    "typeIdentifier": "t_stringliteral_67788119394836e316bdec6d1c2047b340edd6178cf1b24ade2a8d6dd5e9290a",
                                                    "typeString": "literal_string \"KollateralInvokable: repayment reward too high\""
                                                },
                                                "value": "KollateralInvokable: repayment reward too high"
                                            }
                                        ],
                                        "expression": {
                                            "argumentTypes": [
                                                {
                                                    "typeIdentifier": "t_bool",
                                                    "typeString": "bool"
                                                },
                                                {
                                                    "typeIdentifier": "t_stringliteral_67788119394836e316bdec6d1c2047b340edd6178cf1b24ade2a8d6dd5e9290a",
                                                    "typeString": "literal_string \"KollateralInvokable: repayment reward too high\""
                                                }
                                            ],
                                            "id": 1370,
                                            "name": "require",
                                            "nodeType": "Identifier",
                                            "overloadedDeclarations": [
                                                -18,
                                                -18
                                            ],
                                            "referencedDeclaration": -18,
                                            "src": "2257:7:5",
                                            "typeDescriptions": {
                                                "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$",
                                                "typeString": "function (bool,string memory) pure"
                                            }
                                        },
                                        "id": 1375,
                                        "isConstant": false,
                                        "isLValue": false,
                                        "isPure": false,
                                        "kind": "functionCall",
                                        "lValueRequested": false,
                                        "names": [],
                                        "nodeType": "FunctionCall",
                                        "src": "2257:127:5",
                                        "tryCall": false,
                                        "typeDescriptions": {
                                            "typeIdentifier": "t_tuple$__$",
                                            "typeString": "tuple()"
                                        }
                                    },
                                    "id": 1376,
                                    "nodeType": "ExpressionStatement",
                                    "src": "2257:127:5"
                                },
                                {
                                    "id": 1377,
                                    "nodeType": "PlaceholderStatement",
                                    "src": "2395:1:5"
                                }
                            ]
                        },
                        "id": 1379,
                        "name": "repaymentSafeguard",
                        "nodeType": "ModifierDefinition",
                        "parameters": {
                            "id": 1353,
                            "nodeType": "ParameterList",
                            "parameters": [],
                            "src": "2081:2:5"
                        },
                        "src": "2054:349:5",
                        "virtual": false,
                        "visibility": "internal"
                    }
                ],
                "scope": 1381,
                "src": "815:1590:5"
            }
        ],
        "src": "640:1766:5"
    },
    "legacyAST": {
        "attributes": {
            "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/KollateralInvokable.sol",
            "exportedSymbols": {
                "BalanceCarrier": [
                    1464
                ],
                "ExternalCaller": [
                    1563
                ],
                "IERC20": [
                    6165
                ],
                "IInvocationHook": [
                    1170
                ],
                "IInvokable": [
                    1178
                ],
                "KollateralInvokable": [
                    1380
                ],
                "SafeMath": [
                    5584
                ]
            },
            "license": "Apache-2.0"
        },
        "children": [
            {
                "attributes": {
                    "literals": [
                        "solidity",
                        "^",
                        "0.7",
                        ".0"
                    ]
                },
                "id": 1236,
                "name": "PragmaDirective",
                "src": "640:23:5"
            },
            {
                "attributes": {
                    "SourceUnit": 1465,
                    "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/utils/BalanceCarrier.sol",
                    "file": "../utils/BalanceCarrier.sol",
                    "scope": 1381,
                    "symbolAliases": [
                        null
                    ],
                    "unitAlias": ""
                },
                "id": 1237,
                "name": "ImportDirective",
                "src": "665:37:5"
            },
            {
                "attributes": {
                    "SourceUnit": 1171,
                    "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/IInvocationHook.sol",
                    "file": "./IInvocationHook.sol",
                    "scope": 1381,
                    "symbolAliases": [
                        null
                    ],
                    "unitAlias": ""
                },
                "id": 1238,
                "name": "ImportDirective",
                "src": "703:31:5"
            },
            {
                "attributes": {
                    "SourceUnit": 1179,
                    "absolutePath": "/Users/andrekorol/src/kollateral/protocol/contracts/common/invoke/IInvokable.sol",
                    "file": "./IInvokable.sol",
                    "scope": 1381,
                    "symbolAliases": [
                        null
                    ],
                    "unitAlias": ""
                },
                "id": 1239,
                "name": "ImportDirective",
                "src": "735:26:5"
            },
            {
                "attributes": {
                    "SourceUnit": 5585,
                    "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol",
                    "file": "@openzeppelin/contracts/math/SafeMath.sol",
                    "scope": 1381,
                    "symbolAliases": [
                        null
                    ],
                    "unitAlias": ""
                },
                "id": 1240,
                "name": "ImportDirective",
                "src": "762:51:5"
            },
            {
                "attributes": {
                    "abstract": true,
                    "contractDependencies": [
                        1178,
                        1464,
                        1563
                    ],
                    "contractKind": "contract",
                    "fullyImplemented": false,
                    "linearizedBaseContracts": [
                        1380,
                        1464,
                        1563,
                        1178
                    ],
                    "name": "KollateralInvokable",
                    "scope": 1381
                },
                "children": [
                    {
                        "attributes": {},
                        "children": [
                            {
                                "attributes": {
                                    "name": "IInvokable",
                                    "referencedDeclaration": 1178,
                                    "type": "contract IInvokable"
                                },
                                "id": 1241,
                                "name": "UserDefinedTypeName",
                                "src": "856:10:5"
                            }
                        ],
                        "id": 1242,
                        "name": "InheritanceSpecifier",
                        "src": "856:10:5"
                    },
                    {
                        "attributes": {},
                        "children": [
                            {
                                "attributes": {
                                    "name": "BalanceCarrier",
                                    "referencedDeclaration": 1464,
                                    "type": "contract BalanceCarrier"
                                },
                                "id": 1243,
                                "name": "UserDefinedTypeName",
                                "src": "868:14:5"
                            }
                        ],
                        "id": 1244,
                        "name": "InheritanceSpecifier",
                        "src": "868:14:5"
                    },
                    {
                        "children": [
                            {
                                "attributes": {
                                    "name": "SafeMath",
                                    "referencedDeclaration": 5584,
                                    "type": "library SafeMath"
                                },
                                "id": 1245,
                                "name": "UserDefinedTypeName",
                                "src": "895:8:5"
                            },
                            {
                                "attributes": {
                                    "name": "uint256",
                                    "type": "uint256"
                                },
                                "id": 1246,
                                "name": "ElementaryTypeName",
                                "src": "908:7:5"
                            }
                        ],
                        "id": 1247,
                        "name": "UsingForDirective",
                        "src": "889:27:5"
                    },
                    {
                        "attributes": {
                            "constant": false,
                            "mutability": "mutable",
                            "name": "MAX_REWARD_BIPS",
                            "scope": 1380,
                            "stateVariable": true,
                            "storageLocation": "default",
                            "type": "uint256",
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "name": "uint256",
                                    "type": "uint256"
                                },
                                "id": 1248,
                                "name": "ElementaryTypeName",
                                "src": "922:7:5"
                            },
                            {
                                "attributes": {
                                    "hexvalue": "313030",
                                    "isConstant": false,
                                    "isLValue": false,
                                    "isPure": true,
                                    "lValueRequested": false,
                                    "token": "number",
                                    "type": "int_const 100",
                                    "value": "100"
                                },
                                "id": 1249,
                                "name": "Literal",
                                "src": "957:3:5"
                            }
                        ],
                        "id": 1250,
                        "name": "VariableDeclaration",
                        "src": "922:38:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": true,
                            "kind": "constructor",
                            "name": "",
                            "scope": 1380,
                            "stateMutability": "nonpayable",
                            "virtual": false,
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1251,
                                "name": "ParameterList",
                                "src": "978:2:5"
                            },
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1258,
                                "name": "ParameterList",
                                "src": "1008:0:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "overloadedDeclarations": [
                                                null
                                            ],
                                            "referencedDeclaration": 1464,
                                            "type": "type(contract BalanceCarrier)",
                                            "value": "BalanceCarrier"
                                        },
                                        "id": 1252,
                                        "name": "Identifier",
                                        "src": "981:14:5"
                                    },
                                    {
                                        "attributes": {
                                            "isConstant": false,
                                            "isLValue": false,
                                            "isPure": true,
                                            "isStructConstructorCall": false,
                                            "lValueRequested": false,
                                            "names": [
                                                null
                                            ],
                                            "tryCall": false,
                                            "type": "address payable",
                                            "type_conversion": true
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "argumentTypes": [
                                                        {
                                                            "typeIdentifier": "t_rational_1_by_1",
                                                            "typeString": "int_const 1"
                                                        }
                                                    ],
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": true,
                                                    "lValueRequested": false,
                                                    "type": "type(address)"
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "name": "address"
                                                        },
                                                        "id": 1253,
                                                        "name": "ElementaryTypeName",
                                                        "src": "996:7:5"
                                                    }
                                                ],
                                                "id": 1254,
                                                "name": "ElementaryTypeNameExpression",
                                                "src": "996:7:5"
                                            },
                                            {
                                                "attributes": {
                                                    "hexvalue": "31",
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": true,
                                                    "lValueRequested": false,
                                                    "token": "number",
                                                    "type": "int_const 1",
                                                    "value": "1"
                                                },
                                                "id": 1255,
                                                "name": "Literal",
                                                "src": "1004:1:5"
                                            }
                                        ],
                                        "id": 1256,
                                        "name": "FunctionCall",
                                        "src": "996:10:5"
                                    }
                                ],
                                "id": 1257,
                                "name": "ModifierInvocation",
                                "src": "981:26:5"
                            },
                            {
                                "attributes": {
                                    "statements": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1259,
                                "name": "Block",
                                "src": "1008:2:5"
                            }
                        ],
                        "id": 1260,
                        "name": "FunctionDefinition",
                        "src": "967:43:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "receive",
                            "modifiers": [
                                null
                            ],
                            "name": "",
                            "scope": 1380,
                            "stateMutability": "payable",
                            "virtual": false,
                            "visibility": "external"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1261,
                                "name": "ParameterList",
                                "src": "1023:2:5"
                            },
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1262,
                                "name": "ParameterList",
                                "src": "1043:0:5"
                            },
                            {
                                "attributes": {
                                    "statements": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1263,
                                "name": "Block",
                                "src": "1043:2:5"
                            }
                        ],
                        "id": 1264,
                        "name": "FunctionDefinition",
                        "src": "1016:29:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "fallback",
                            "modifiers": [
                                null
                            ],
                            "name": "",
                            "scope": 1380,
                            "stateMutability": "payable",
                            "virtual": false,
                            "visibility": "external"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1265,
                                "name": "ParameterList",
                                "src": "1059:2:5"
                            },
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1266,
                                "name": "ParameterList",
                                "src": "1079:0:5"
                            },
                            {
                                "attributes": {
                                    "statements": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1267,
                                "name": "Block",
                                "src": "1079:2:5"
                            }
                        ],
                        "id": 1268,
                        "name": "FunctionDefinition",
                        "src": "1051:30:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "name": "repay",
                            "scope": 1380,
                            "stateMutability": "nonpayable",
                            "virtual": false,
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1269,
                                "name": "ParameterList",
                                "src": "1101:2:5"
                            },
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1272,
                                "name": "ParameterList",
                                "src": "1132:0:5"
                            },
                            {
                                "attributes": {},
                                "children": [
                                    {
                                        "attributes": {
                                            "overloadedDeclarations": [
                                                null
                                            ],
                                            "referencedDeclaration": 1379,
                                            "type": "modifier ()",
                                            "value": "repaymentSafeguard"
                                        },
                                        "id": 1270,
                                        "name": "Identifier",
                                        "src": "1113:18:5"
                                    }
                                ],
                                "id": 1271,
                                "name": "ModifierInvocation",
                                "src": "1113:18:5"
                            },
                            {
                                "children": [
                                    {
                                        "children": [
                                            {
                                                "attributes": {
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "tuple()",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_bool",
                                                                    "typeString": "bool"
                                                                },
                                                                {
                                                                    "typeIdentifier": "t_stringliteral_25039293441dc3e8232a383779798de2494653a268629a0301d0a232553a467e",
                                                                    "typeString": "literal_string \"KollateralInvokable: failed to repay\""
                                                                }
                                                            ],
                                                            "overloadedDeclarations": [
                                                                -18,
                                                                -18
                                                            ],
                                                            "referencedDeclaration": -18,
                                                            "type": "function (bool,string memory) pure",
                                                            "value": "require"
                                                        },
                                                        "id": 1273,
                                                        "name": "Identifier",
                                                        "src": "1142:7:5"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "isStructConstructorCall": false,
                                                            "lValueRequested": false,
                                                            "names": [
                                                                null
                                                            ],
                                                            "tryCall": false,
                                                            "type": "bool",
                                                            "type_conversion": false
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": [
                                                                        {
                                                                            "typeIdentifier": "t_address",
                                                                            "typeString": "address"
                                                                        },
                                                                        {
                                                                            "typeIdentifier": "t_address_payable",
                                                                            "typeString": "address payable"
                                                                        },
                                                                        {
                                                                            "typeIdentifier": "t_uint256",
                                                                            "typeString": "uint256"
                                                                        }
                                                                    ],
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 1433,
                                                                    "type": "function (address,address,uint256) returns (bool)",
                                                                    "value": "transfer"
                                                                },
                                                                "id": 1274,
                                                                "name": "Identifier",
                                                                "src": "1163:8:5"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "arguments": [
                                                                        null
                                                                    ],
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "address",
                                                                    "type_conversion": false
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                null
                                                                            ],
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 1312,
                                                                            "type": "function () view returns (address)",
                                                                            "value": "currentTokenAddress"
                                                                        },
                                                                        "id": 1275,
                                                                        "name": "Identifier",
                                                                        "src": "1189:19:5"
                                                                    }
                                                                ],
                                                                "id": 1276,
                                                                "name": "FunctionCall",
                                                                "src": "1189:21:5"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "lValueRequested": false,
                                                                    "member_name": "sender",
                                                                    "type": "address payable"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": -15,
                                                                            "type": "msg",
                                                                            "value": "msg"
                                                                        },
                                                                        "id": 1277,
                                                                        "name": "Identifier",
                                                                        "src": "1228:3:5"
                                                                    }
                                                                ],
                                                                "id": 1278,
                                                                "name": "MemberAccess",
                                                                "src": "1228:10:5"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "arguments": [
                                                                        null
                                                                    ],
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "uint256",
                                                                    "type_conversion": false
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                null
                                                                            ],
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 1338,
                                                                            "type": "function () view returns (uint256)",
                                                                            "value": "currentRepaymentAmount"
                                                                        },
                                                                        "id": 1279,
                                                                        "name": "Identifier",
                                                                        "src": "1256:22:5"
                                                                    }
                                                                ],
                                                                "id": 1280,
                                                                "name": "FunctionCall",
                                                                "src": "1256:24:5"
                                                            }
                                                        ],
                                                        "id": 1281,
                                                        "name": "FunctionCall",
                                                        "src": "1163:131:5"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "hexvalue": "4b6f6c6c61746572616c496e766f6b61626c653a206661696c656420746f207265706179",
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "lValueRequested": false,
                                                            "token": "string",
                                                            "type": "literal_string \"KollateralInvokable: failed to repay\"",
                                                            "value": "KollateralInvokable: failed to repay"
                                                        },
                                                        "id": 1282,
                                                        "name": "Literal",
                                                        "src": "1308:38:5"
                                                    }
                                                ],
                                                "id": 1283,
                                                "name": "FunctionCall",
                                                "src": "1142:214:5"
                                            }
                                        ],
                                        "id": 1284,
                                        "name": "ExpressionStatement",
                                        "src": "1142:214:5"
                                    }
                                ],
                                "id": 1285,
                                "name": "Block",
                                "src": "1132:231:5"
                            }
                        ],
                        "id": 1286,
                        "name": "FunctionDefinition",
                        "src": "1087:276:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "modifiers": [
                                null
                            ],
                            "name": "currentSender",
                            "scope": 1380,
                            "stateMutability": "view",
                            "virtual": false,
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1287,
                                "name": "ParameterList",
                                "src": "1391:2:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "",
                                            "scope": 1299,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "address",
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "address",
                                                    "stateMutability": "nonpayable",
                                                    "type": "address"
                                                },
                                                "id": 1288,
                                                "name": "ElementaryTypeName",
                                                "src": "1417:7:5"
                                            }
                                        ],
                                        "id": 1289,
                                        "name": "VariableDeclaration",
                                        "src": "1417:7:5"
                                    }
                                ],
                                "id": 1290,
                                "name": "ParameterList",
                                "src": "1416:9:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "functionReturnParameters": 1290
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "arguments": [
                                                        null
                                                    ],
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "address",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                null
                                                            ],
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "lValueRequested": false,
                                                            "member_name": "currentSender",
                                                            "referencedDeclaration": 1154,
                                                            "type": "function () view external returns (address)"
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "contract IInvocationHook",
                                                                    "type_conversion": true
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address_payable",
                                                                                    "typeString": "address payable"
                                                                                }
                                                                            ],
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 1170,
                                                                            "type": "type(contract IInvocationHook)",
                                                                            "value": "IInvocationHook"
                                                                        },
                                                                        "id": 1291,
                                                                        "name": "Identifier",
                                                                        "src": "1443:15:5"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "sender",
                                                                            "type": "address payable"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": -15,
                                                                                    "type": "msg",
                                                                                    "value": "msg"
                                                                                },
                                                                                "id": 1292,
                                                                                "name": "Identifier",
                                                                                "src": "1459:3:5"
                                                                            }
                                                                        ],
                                                                        "id": 1293,
                                                                        "name": "MemberAccess",
                                                                        "src": "1459:10:5"
                                                                    }
                                                                ],
                                                                "id": 1294,
                                                                "name": "FunctionCall",
                                                                "src": "1443:27:5"
                                                            }
                                                        ],
                                                        "id": 1295,
                                                        "name": "MemberAccess",
                                                        "src": "1443:41:5"
                                                    }
                                                ],
                                                "id": 1296,
                                                "name": "FunctionCall",
                                                "src": "1443:43:5"
                                            }
                                        ],
                                        "id": 1297,
                                        "name": "Return",
                                        "src": "1436:50:5"
                                    }
                                ],
                                "id": 1298,
                                "name": "Block",
                                "src": "1426:67:5"
                            }
                        ],
                        "id": 1299,
                        "name": "FunctionDefinition",
                        "src": "1369:124:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "modifiers": [
                                null
                            ],
                            "name": "currentTokenAddress",
                            "scope": 1380,
                            "stateMutability": "view",
                            "virtual": false,
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1300,
                                "name": "ParameterList",
                                "src": "1527:2:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "",
                                            "scope": 1312,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "address",
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "address",
                                                    "stateMutability": "nonpayable",
                                                    "type": "address"
                                                },
                                                "id": 1301,
                                                "name": "ElementaryTypeName",
                                                "src": "1553:7:5"
                                            }
                                        ],
                                        "id": 1302,
                                        "name": "VariableDeclaration",
                                        "src": "1553:7:5"
                                    }
                                ],
                                "id": 1303,
                                "name": "ParameterList",
                                "src": "1552:9:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "functionReturnParameters": 1303
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "arguments": [
                                                        null
                                                    ],
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "address",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                null
                                                            ],
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "lValueRequested": false,
                                                            "member_name": "currentTokenAddress",
                                                            "referencedDeclaration": 1159,
                                                            "type": "function () view external returns (address)"
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "contract IInvocationHook",
                                                                    "type_conversion": true
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address_payable",
                                                                                    "typeString": "address payable"
                                                                                }
                                                                            ],
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 1170,
                                                                            "type": "type(contract IInvocationHook)",
                                                                            "value": "IInvocationHook"
                                                                        },
                                                                        "id": 1304,
                                                                        "name": "Identifier",
                                                                        "src": "1579:15:5"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "sender",
                                                                            "type": "address payable"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": -15,
                                                                                    "type": "msg",
                                                                                    "value": "msg"
                                                                                },
                                                                                "id": 1305,
                                                                                "name": "Identifier",
                                                                                "src": "1595:3:5"
                                                                            }
                                                                        ],
                                                                        "id": 1306,
                                                                        "name": "MemberAccess",
                                                                        "src": "1595:10:5"
                                                                    }
                                                                ],
                                                                "id": 1307,
                                                                "name": "FunctionCall",
                                                                "src": "1579:27:5"
                                                            }
                                                        ],
                                                        "id": 1308,
                                                        "name": "MemberAccess",
                                                        "src": "1579:47:5"
                                                    }
                                                ],
                                                "id": 1309,
                                                "name": "FunctionCall",
                                                "src": "1579:49:5"
                                            }
                                        ],
                                        "id": 1310,
                                        "name": "Return",
                                        "src": "1572:56:5"
                                    }
                                ],
                                "id": 1311,
                                "name": "Block",
                                "src": "1562:73:5"
                            }
                        ],
                        "id": 1312,
                        "name": "FunctionDefinition",
                        "src": "1499:136:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "modifiers": [
                                null
                            ],
                            "name": "currentTokenAmount",
                            "scope": 1380,
                            "stateMutability": "view",
                            "virtual": false,
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1313,
                                "name": "ParameterList",
                                "src": "1668:2:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "",
                                            "scope": 1325,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "uint256",
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "uint256",
                                                    "type": "uint256"
                                                },
                                                "id": 1314,
                                                "name": "ElementaryTypeName",
                                                "src": "1694:7:5"
                                            }
                                        ],
                                        "id": 1315,
                                        "name": "VariableDeclaration",
                                        "src": "1694:7:5"
                                    }
                                ],
                                "id": 1316,
                                "name": "ParameterList",
                                "src": "1693:9:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "functionReturnParameters": 1316
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "arguments": [
                                                        null
                                                    ],
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "uint256",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                null
                                                            ],
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "lValueRequested": false,
                                                            "member_name": "currentTokenAmount",
                                                            "referencedDeclaration": 1164,
                                                            "type": "function () view external returns (uint256)"
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "contract IInvocationHook",
                                                                    "type_conversion": true
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address_payable",
                                                                                    "typeString": "address payable"
                                                                                }
                                                                            ],
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 1170,
                                                                            "type": "type(contract IInvocationHook)",
                                                                            "value": "IInvocationHook"
                                                                        },
                                                                        "id": 1317,
                                                                        "name": "Identifier",
                                                                        "src": "1720:15:5"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "sender",
                                                                            "type": "address payable"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": -15,
                                                                                    "type": "msg",
                                                                                    "value": "msg"
                                                                                },
                                                                                "id": 1318,
                                                                                "name": "Identifier",
                                                                                "src": "1736:3:5"
                                                                            }
                                                                        ],
                                                                        "id": 1319,
                                                                        "name": "MemberAccess",
                                                                        "src": "1736:10:5"
                                                                    }
                                                                ],
                                                                "id": 1320,
                                                                "name": "FunctionCall",
                                                                "src": "1720:27:5"
                                                            }
                                                        ],
                                                        "id": 1321,
                                                        "name": "MemberAccess",
                                                        "src": "1720:46:5"
                                                    }
                                                ],
                                                "id": 1322,
                                                "name": "FunctionCall",
                                                "src": "1720:48:5"
                                            }
                                        ],
                                        "id": 1323,
                                        "name": "Return",
                                        "src": "1713:55:5"
                                    }
                                ],
                                "id": 1324,
                                "name": "Block",
                                "src": "1703:72:5"
                            }
                        ],
                        "id": 1325,
                        "name": "FunctionDefinition",
                        "src": "1641:134:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "modifiers": [
                                null
                            ],
                            "name": "currentRepaymentAmount",
                            "scope": 1380,
                            "stateMutability": "view",
                            "virtual": false,
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1326,
                                "name": "ParameterList",
                                "src": "1812:2:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "",
                                            "scope": 1338,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "uint256",
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "uint256",
                                                    "type": "uint256"
                                                },
                                                "id": 1327,
                                                "name": "ElementaryTypeName",
                                                "src": "1838:7:5"
                                            }
                                        ],
                                        "id": 1328,
                                        "name": "VariableDeclaration",
                                        "src": "1838:7:5"
                                    }
                                ],
                                "id": 1329,
                                "name": "ParameterList",
                                "src": "1837:9:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "functionReturnParameters": 1329
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "arguments": [
                                                        null
                                                    ],
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "uint256",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                null
                                                            ],
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "lValueRequested": false,
                                                            "member_name": "currentRepaymentAmount",
                                                            "referencedDeclaration": 1169,
                                                            "type": "function () view external returns (uint256)"
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "contract IInvocationHook",
                                                                    "type_conversion": true
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_address_payable",
                                                                                    "typeString": "address payable"
                                                                                }
                                                                            ],
                                                                            "overloadedDeclarations": [
                                                                                null
                                                                            ],
                                                                            "referencedDeclaration": 1170,
                                                                            "type": "type(contract IInvocationHook)",
                                                                            "value": "IInvocationHook"
                                                                        },
                                                                        "id": 1330,
                                                                        "name": "Identifier",
                                                                        "src": "1864:15:5"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "sender",
                                                                            "type": "address payable"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "overloadedDeclarations": [
                                                                                        null
                                                                                    ],
                                                                                    "referencedDeclaration": -15,
                                                                                    "type": "msg",
                                                                                    "value": "msg"
                                                                                },
                                                                                "id": 1331,
                                                                                "name": "Identifier",
                                                                                "src": "1880:3:5"
                                                                            }
                                                                        ],
                                                                        "id": 1332,
                                                                        "name": "MemberAccess",
                                                                        "src": "1880:10:5"
                                                                    }
                                                                ],
                                                                "id": 1333,
                                                                "name": "FunctionCall",
                                                                "src": "1864:27:5"
                                                            }
                                                        ],
                                                        "id": 1334,
                                                        "name": "MemberAccess",
                                                        "src": "1864:50:5"
                                                    }
                                                ],
                                                "id": 1335,
                                                "name": "FunctionCall",
                                                "src": "1864:52:5"
                                            }
                                        ],
                                        "id": 1336,
                                        "name": "Return",
                                        "src": "1857:59:5"
                                    }
                                ],
                                "id": 1337,
                                "name": "Block",
                                "src": "1847:76:5"
                            }
                        ],
                        "id": 1338,
                        "name": "FunctionDefinition",
                        "src": "1781:142:5"
                    },
                    {
                        "attributes": {
                            "implemented": true,
                            "isConstructor": false,
                            "kind": "function",
                            "modifiers": [
                                null
                            ],
                            "name": "isCurrentTokenEther",
                            "scope": 1380,
                            "stateMutability": "view",
                            "virtual": false,
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1339,
                                "name": "ParameterList",
                                "src": "1957:2:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "constant": false,
                                            "mutability": "mutable",
                                            "name": "",
                                            "scope": 1352,
                                            "stateVariable": false,
                                            "storageLocation": "default",
                                            "type": "bool",
                                            "visibility": "internal"
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "name": "bool",
                                                    "type": "bool"
                                                },
                                                "id": 1340,
                                                "name": "ElementaryTypeName",
                                                "src": "1983:4:5"
                                            }
                                        ],
                                        "id": 1341,
                                        "name": "VariableDeclaration",
                                        "src": "1983:4:5"
                                    }
                                ],
                                "id": 1342,
                                "name": "ParameterList",
                                "src": "1982:6:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "functionReturnParameters": 1342
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "commonType": {
                                                        "typeIdentifier": "t_address",
                                                        "typeString": "address"
                                                    },
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "lValueRequested": false,
                                                    "operator": "==",
                                                    "type": "bool"
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "arguments": [
                                                                null
                                                            ],
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "isStructConstructorCall": false,
                                                            "lValueRequested": false,
                                                            "names": [
                                                                null
                                                            ],
                                                            "tryCall": false,
                                                            "type": "address",
                                                            "type_conversion": false
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": [
                                                                        null
                                                                    ],
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 1312,
                                                                    "type": "function () view returns (address)",
                                                                    "value": "currentTokenAddress"
                                                                },
                                                                "id": 1343,
                                                                "name": "Identifier",
                                                                "src": "2006:19:5"
                                                            }
                                                        ],
                                                        "id": 1344,
                                                        "name": "FunctionCall",
                                                        "src": "2006:21:5"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "isStructConstructorCall": false,
                                                            "lValueRequested": false,
                                                            "names": [
                                                                null
                                                            ],
                                                            "tryCall": false,
                                                            "type": "address payable",
                                                            "type_conversion": true
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": [
                                                                        {
                                                                            "typeIdentifier": "t_rational_1_by_1",
                                                                            "typeString": "int_const 1"
                                                                        }
                                                                    ],
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": true,
                                                                    "lValueRequested": false,
                                                                    "type": "type(address)"
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "name": "address"
                                                                        },
                                                                        "id": 1345,
                                                                        "name": "ElementaryTypeName",
                                                                        "src": "2031:7:5"
                                                                    }
                                                                ],
                                                                "id": 1346,
                                                                "name": "ElementaryTypeNameExpression",
                                                                "src": "2031:7:5"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "hexvalue": "31",
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": true,
                                                                    "lValueRequested": false,
                                                                    "token": "number",
                                                                    "type": "int_const 1",
                                                                    "value": "1"
                                                                },
                                                                "id": 1347,
                                                                "name": "Literal",
                                                                "src": "2039:1:5"
                                                            }
                                                        ],
                                                        "id": 1348,
                                                        "name": "FunctionCall",
                                                        "src": "2031:10:5"
                                                    }
                                                ],
                                                "id": 1349,
                                                "name": "BinaryOperation",
                                                "src": "2006:35:5"
                                            }
                                        ],
                                        "id": 1350,
                                        "name": "Return",
                                        "src": "1999:42:5"
                                    }
                                ],
                                "id": 1351,
                                "name": "Block",
                                "src": "1989:59:5"
                            }
                        ],
                        "id": 1352,
                        "name": "FunctionDefinition",
                        "src": "1929:119:5"
                    },
                    {
                        "attributes": {
                            "name": "repaymentSafeguard",
                            "virtual": false,
                            "visibility": "internal"
                        },
                        "children": [
                            {
                                "attributes": {
                                    "parameters": [
                                        null
                                    ]
                                },
                                "children": [],
                                "id": 1353,
                                "name": "ParameterList",
                                "src": "2081:2:5"
                            },
                            {
                                "children": [
                                    {
                                        "attributes": {
                                            "assignments": [
                                                1355
                                            ]
                                        },
                                        "children": [
                                            {
                                                "attributes": {
                                                    "constant": false,
                                                    "mutability": "mutable",
                                                    "name": "effectiveReward",
                                                    "scope": 1378,
                                                    "stateVariable": false,
                                                    "storageLocation": "default",
                                                    "type": "uint256",
                                                    "visibility": "internal"
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "name": "uint256",
                                                            "type": "uint256"
                                                        },
                                                        "id": 1354,
                                                        "name": "ElementaryTypeName",
                                                        "src": "2094:7:5"
                                                    }
                                                ],
                                                "id": 1355,
                                                "name": "VariableDeclaration",
                                                "src": "2094:23:5"
                                            },
                                            {
                                                "attributes": {
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "uint256",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_uint256",
                                                                    "typeString": "uint256"
                                                                }
                                                            ],
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "lValueRequested": false,
                                                            "member_name": "div",
                                                            "referencedDeclaration": 5514,
                                                            "type": "function (uint256,uint256) pure returns (uint256)"
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "isConstant": false,
                                                                    "isLValue": false,
                                                                    "isPure": false,
                                                                    "isStructConstructorCall": false,
                                                                    "lValueRequested": false,
                                                                    "names": [
                                                                        null
                                                                    ],
                                                                    "tryCall": false,
                                                                    "type": "uint256",
                                                                    "type_conversion": false
                                                                },
                                                                "children": [
                                                                    {
                                                                        "attributes": {
                                                                            "argumentTypes": [
                                                                                {
                                                                                    "typeIdentifier": "t_rational_10000_by_1",
                                                                                    "typeString": "int_const 10000"
                                                                                }
                                                                            ],
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": false,
                                                                            "lValueRequested": false,
                                                                            "member_name": "mul",
                                                                            "referencedDeclaration": 5497,
                                                                            "type": "function (uint256,uint256) pure returns (uint256)"
                                                                        },
                                                                        "children": [
                                                                            {
                                                                                "attributes": {
                                                                                    "isConstant": false,
                                                                                    "isLValue": false,
                                                                                    "isPure": false,
                                                                                    "isStructConstructorCall": false,
                                                                                    "lValueRequested": false,
                                                                                    "names": [
                                                                                        null
                                                                                    ],
                                                                                    "tryCall": false,
                                                                                    "type": "uint256",
                                                                                    "type_conversion": false
                                                                                },
                                                                                "children": [
                                                                                    {
                                                                                        "attributes": {
                                                                                            "argumentTypes": [
                                                                                                {
                                                                                                    "typeIdentifier": "t_uint256",
                                                                                                    "typeString": "uint256"
                                                                                                }
                                                                                            ],
                                                                                            "isConstant": false,
                                                                                            "isLValue": false,
                                                                                            "isPure": false,
                                                                                            "lValueRequested": false,
                                                                                            "member_name": "sub",
                                                                                            "referencedDeclaration": 5434,
                                                                                            "type": "function (uint256,uint256) pure returns (uint256)"
                                                                                        },
                                                                                        "children": [
                                                                                            {
                                                                                                "attributes": {
                                                                                                    "arguments": [
                                                                                                        null
                                                                                                    ],
                                                                                                    "isConstant": false,
                                                                                                    "isLValue": false,
                                                                                                    "isPure": false,
                                                                                                    "isStructConstructorCall": false,
                                                                                                    "lValueRequested": false,
                                                                                                    "names": [
                                                                                                        null
                                                                                                    ],
                                                                                                    "tryCall": false,
                                                                                                    "type": "uint256",
                                                                                                    "type_conversion": false
                                                                                                },
                                                                                                "children": [
                                                                                                    {
                                                                                                        "attributes": {
                                                                                                            "argumentTypes": [
                                                                                                                null
                                                                                                            ],
                                                                                                            "overloadedDeclarations": [
                                                                                                                null
                                                                                                            ],
                                                                                                            "referencedDeclaration": 1338,
                                                                                                            "type": "function () view returns (uint256)",
                                                                                                            "value": "currentRepaymentAmount"
                                                                                                        },
                                                                                                        "id": 1356,
                                                                                                        "name": "Identifier",
                                                                                                        "src": "2120:22:5"
                                                                                                    }
                                                                                                ],
                                                                                                "id": 1357,
                                                                                                "name": "FunctionCall",
                                                                                                "src": "2120:24:5"
                                                                                            }
                                                                                        ],
                                                                                        "id": 1358,
                                                                                        "name": "MemberAccess",
                                                                                        "src": "2120:41:5"
                                                                                    },
                                                                                    {
                                                                                        "attributes": {
                                                                                            "arguments": [
                                                                                                null
                                                                                            ],
                                                                                            "isConstant": false,
                                                                                            "isLValue": false,
                                                                                            "isPure": false,
                                                                                            "isStructConstructorCall": false,
                                                                                            "lValueRequested": false,
                                                                                            "names": [
                                                                                                null
                                                                                            ],
                                                                                            "tryCall": false,
                                                                                            "type": "uint256",
                                                                                            "type_conversion": false
                                                                                        },
                                                                                        "children": [
                                                                                            {
                                                                                                "attributes": {
                                                                                                    "argumentTypes": [
                                                                                                        null
                                                                                                    ],
                                                                                                    "overloadedDeclarations": [
                                                                                                        null
                                                                                                    ],
                                                                                                    "referencedDeclaration": 1325,
                                                                                                    "type": "function () view returns (uint256)",
                                                                                                    "value": "currentTokenAmount"
                                                                                                },
                                                                                                "id": 1359,
                                                                                                "name": "Identifier",
                                                                                                "src": "2162:18:5"
                                                                                            }
                                                                                        ],
                                                                                        "id": 1360,
                                                                                        "name": "FunctionCall",
                                                                                        "src": "2162:20:5"
                                                                                    }
                                                                                ],
                                                                                "id": 1361,
                                                                                "name": "FunctionCall",
                                                                                "src": "2120:63:5"
                                                                            }
                                                                        ],
                                                                        "id": 1362,
                                                                        "name": "MemberAccess",
                                                                        "src": "2120:80:5"
                                                                    },
                                                                    {
                                                                        "attributes": {
                                                                            "hexvalue": "3130303030",
                                                                            "isConstant": false,
                                                                            "isLValue": false,
                                                                            "isPure": true,
                                                                            "lValueRequested": false,
                                                                            "token": "number",
                                                                            "type": "int_const 10000",
                                                                            "value": "10000"
                                                                        },
                                                                        "id": 1363,
                                                                        "name": "Literal",
                                                                        "src": "2201:5:5"
                                                                    }
                                                                ],
                                                                "id": 1364,
                                                                "name": "FunctionCall",
                                                                "src": "2120:87:5"
                                                            }
                                                        ],
                                                        "id": 1365,
                                                        "name": "MemberAccess",
                                                        "src": "2120:104:5"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "arguments": [
                                                                null
                                                            ],
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "isStructConstructorCall": false,
                                                            "lValueRequested": false,
                                                            "names": [
                                                                null
                                                            ],
                                                            "tryCall": false,
                                                            "type": "uint256",
                                                            "type_conversion": false
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "argumentTypes": [
                                                                        null
                                                                    ],
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 1325,
                                                                    "type": "function () view returns (uint256)",
                                                                    "value": "currentTokenAmount"
                                                                },
                                                                "id": 1366,
                                                                "name": "Identifier",
                                                                "src": "2225:18:5"
                                                            }
                                                        ],
                                                        "id": 1367,
                                                        "name": "FunctionCall",
                                                        "src": "2225:20:5"
                                                    }
                                                ],
                                                "id": 1368,
                                                "name": "FunctionCall",
                                                "src": "2120:126:5"
                                            }
                                        ],
                                        "id": 1369,
                                        "name": "VariableDeclarationStatement",
                                        "src": "2094:152:5"
                                    },
                                    {
                                        "children": [
                                            {
                                                "attributes": {
                                                    "isConstant": false,
                                                    "isLValue": false,
                                                    "isPure": false,
                                                    "isStructConstructorCall": false,
                                                    "lValueRequested": false,
                                                    "names": [
                                                        null
                                                    ],
                                                    "tryCall": false,
                                                    "type": "tuple()",
                                                    "type_conversion": false
                                                },
                                                "children": [
                                                    {
                                                        "attributes": {
                                                            "argumentTypes": [
                                                                {
                                                                    "typeIdentifier": "t_bool",
                                                                    "typeString": "bool"
                                                                },
                                                                {
                                                                    "typeIdentifier": "t_stringliteral_67788119394836e316bdec6d1c2047b340edd6178cf1b24ade2a8d6dd5e9290a",
                                                                    "typeString": "literal_string \"KollateralInvokable: repayment reward too high\""
                                                                }
                                                            ],
                                                            "overloadedDeclarations": [
                                                                -18,
                                                                -18
                                                            ],
                                                            "referencedDeclaration": -18,
                                                            "type": "function (bool,string memory) pure",
                                                            "value": "require"
                                                        },
                                                        "id": 1370,
                                                        "name": "Identifier",
                                                        "src": "2257:7:5"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "commonType": {
                                                                "typeIdentifier": "t_uint256",
                                                                "typeString": "uint256"
                                                            },
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": false,
                                                            "lValueRequested": false,
                                                            "operator": "<=",
                                                            "type": "bool"
                                                        },
                                                        "children": [
                                                            {
                                                                "attributes": {
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 1355,
                                                                    "type": "uint256",
                                                                    "value": "effectiveReward"
                                                                },
                                                                "id": 1371,
                                                                "name": "Identifier",
                                                                "src": "2278:15:5"
                                                            },
                                                            {
                                                                "attributes": {
                                                                    "overloadedDeclarations": [
                                                                        null
                                                                    ],
                                                                    "referencedDeclaration": 1250,
                                                                    "type": "uint256",
                                                                    "value": "MAX_REWARD_BIPS"
                                                                },
                                                                "id": 1372,
                                                                "name": "Identifier",
                                                                "src": "2297:15:5"
                                                            }
                                                        ],
                                                        "id": 1373,
                                                        "name": "BinaryOperation",
                                                        "src": "2278:34:5"
                                                    },
                                                    {
                                                        "attributes": {
                                                            "hexvalue": "4b6f6c6c61746572616c496e766f6b61626c653a2072657061796d656e742072657761726420746f6f2068696768",
                                                            "isConstant": false,
                                                            "isLValue": false,
                                                            "isPure": true,
                                                            "lValueRequested": false,
                                                            "token": "string",
                                                            "type": "literal_string \"KollateralInvokable: repayment reward too high\"",
                                                            "value": "KollateralInvokable: repayment reward too high"
                                                        },
                                                        "id": 1374,
                                                        "name": "Literal",
                                                        "src": "2326:48:5"
                                                    }
                                                ],
                                                "id": 1375,
                                                "name": "FunctionCall",
                                                "src": "2257:127:5"
                                            }
                                        ],
                                        "id": 1376,
                                        "name": "ExpressionStatement",
                                        "src": "2257:127:5"
                                    },
                                    {
                                        "id": 1377,
                                        "name": "PlaceholderStatement",
                                        "src": "2395:1:5"
                                    }
                                ],
                                "id": 1378,
                                "name": "Block",
                                "src": "2084:319:5"
                            }
                        ],
                        "id": 1379,
                        "name": "ModifierDefinition",
                        "src": "2054:349:5"
                    }
                ],
                "id": 1380,
                "name": "ContractDefinition",
                "src": "815:1590:5"
            }
        ],
        "id": 1381,
        "name": "SourceUnit",
        "src": "640:1766:5"
    },
    "compiler": {
        "name": "solc",
        "version": "0.7.3+commit.9bfce1f6.Emscripten.clang"
    },
    "networks": {},
    "schemaVersion": "3.3.3",
    "updatedAt": "2021-02-01T23:13:33.200Z",
    "devdoc": {
        "kind": "dev",
        "methods": {},
        "version": 1
    },
    "userdoc": {
        "kind": "user",
        "methods": {},
        "version": 1
    }
}
