{
  "contractName": "IRToken",
  "abi": [
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Approval",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "account",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "oldHatID",
          "type": "uint256"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "newHatID",
          "type": "uint256"
        }
      ],
      "name": "HatChanged",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "hatID",
          "type": "uint256"
        }
      ],
      "name": "HatCreated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "InterestPaid",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "uint256",
          "name": "hatId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "bool",
          "name": "isDistribution",
          "type": "bool"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "redeemableAmount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "internalSavingsAmount",
          "type": "uint256"
        }
      ],
      "name": "LoansTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "from",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "to",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "value",
          "type": "uint256"
        }
      ],
      "name": "Transfer",
      "type": "event"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        }
      ],
      "name": "allowance",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "spender",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "approve",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "account",
          "type": "address"
        }
      ],
      "name": "balanceOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "totalSupply",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transfer",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "sender",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "recipient",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "transferFrom",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "token",
      "outputs": [
        {
          "internalType": "contract IERC20",
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "name",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "symbol",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "decimals",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "mintAmount",
          "type": "uint256"
        }
      ],
      "name": "mint",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "mintAmount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "hatID",
          "type": "uint256"
        }
      ],
      "name": "mintWithSelectedHat",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "mintAmount",
          "type": "uint256"
        },
        {
          "internalType": "address[]",
          "name": "recipients",
          "type": "address[]"
        },
        {
          "internalType": "uint32[]",
          "name": "proportions",
          "type": "uint32[]"
        }
      ],
      "name": "mintWithNewHat",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "dst",
          "type": "address"
        }
      ],
      "name": "transferAll",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "src",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "dst",
          "type": "address"
        }
      ],
      "name": "transferAllFrom",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "redeemTokens",
          "type": "uint256"
        }
      ],
      "name": "redeem",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "redeemAll",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "redeemTo",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "redeemTokens",
          "type": "uint256"
        }
      ],
      "name": "redeemAndTransfer",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "redeemTo",
          "type": "address"
        }
      ],
      "name": "redeemAndTransferAll",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address[]",
          "name": "recipients",
          "type": "address[]"
        },
        {
          "internalType": "uint32[]",
          "name": "proportions",
          "type": "uint32[]"
        },
        {
          "internalType": "bool",
          "name": "doChangeHat",
          "type": "bool"
        }
      ],
      "name": "createHat",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "hatID",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "hatID",
          "type": "uint256"
        }
      ],
      "name": "changeHat",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "payInterest",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getMaximumHatID",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "hatID",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "getHatByAddress",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "hatID",
          "type": "uint256"
        },
        {
          "internalType": "address[]",
          "name": "recipients",
          "type": "address[]"
        },
        {
          "internalType": "uint32[]",
          "name": "proportions",
          "type": "uint32[]"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "hatID",
          "type": "uint256"
        }
      ],
      "name": "getHatByID",
      "outputs": [
        {
          "internalType": "address[]",
          "name": "recipients",
          "type": "address[]"
        },
        {
          "internalType": "uint32[]",
          "name": "proportions",
          "type": "uint32[]"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "receivedSavingsOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "receivedLoanOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "interestPayableOf",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "ias",
      "outputs": [
        {
          "internalType": "contract IAllocationStrategy",
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": false,
      "inputs": [],
      "name": "savingAssetConversionRate",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getCurrentSavingStrategy",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getSavingAssetBalance",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "rAmount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "sOriginalAmount",
          "type": "uint256"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [],
      "name": "getGlobalStats",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "totalSupply",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "totalSavingsAmount",
              "type": "uint256"
            }
          ],
          "internalType": "struct RTokenStructs.GlobalStats",
          "name": "",
          "type": "tuple"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "address",
          "name": "owner",
          "type": "address"
        }
      ],
      "name": "getAccountStats",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "hatID",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "rAmount",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "rInterest",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "lDebt",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "sInternalAmount",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "rInterestPayable",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "cumulativeInterest",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "lRecipientsSum",
              "type": "uint256"
            }
          ],
          "internalType": "struct RTokenStructs.AccountStatsView",
          "name": "",
          "type": "tuple"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    },
    {
      "constant": true,
      "inputs": [
        {
          "internalType": "uint256",
          "name": "hatID",
          "type": "uint256"
        }
      ],
      "name": "getHatStats",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "useCount",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "totalLoans",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "totalSavings",
              "type": "uint256"
            }
          ],
          "internalType": "struct RTokenStructs.HatStatsView",
          "name": "",
          "type": "tuple"
        }
      ],
      "payable": false,
      "stateMutability": "view",
      "type": "function"
    }
  ],
  "metadata": "{\"compiler\":{\"version\":\"0.5.12+commit.7709ece9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldHatID\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newHatID\",\"type\":\"uint256\"}],\"name\":\"HatChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"}],\"name\":\"HatCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"InterestPaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"hatId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isDistribution\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"redeemableAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"internalSavingsAmount\",\"type\":\"uint256\"}],\"name\":\"LoansTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"}],\"name\":\"changeHat\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"recipients\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"proportions\",\"type\":\"uint32[]\"},{\"internalType\":\"bool\",\"name\":\"doChangeHat\",\"type\":\"bool\"}],\"name\":\"createHat\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getAccountStats\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rInterest\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lDebt\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sInternalAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rInterestPayable\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"cumulativeInterest\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lRecipientsSum\",\"type\":\"uint256\"}],\"internalType\":\"struct RTokenStructs.AccountStatsView\",\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getCurrentSavingStrategy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getGlobalStats\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"totalSupply\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalSavingsAmount\",\"type\":\"uint256\"}],\"internalType\":\"struct RTokenStructs.GlobalStats\",\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"getHatByAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"recipients\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"proportions\",\"type\":\"uint32[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"}],\"name\":\"getHatByID\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"recipients\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"proportions\",\"type\":\"uint32[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"}],\"name\":\"getHatStats\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"useCount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalLoans\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalSavings\",\"type\":\"uint256\"}],\"internalType\":\"struct RTokenStructs.HatStatsView\",\"name\":\"\",\"type\":\"tuple\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getMaximumHatID\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getSavingAssetBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"rAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sOriginalAmount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"ias\",\"outputs\":[{\"internalType\":\"contract IAllocationStrategy\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"interestPayableOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"recipients\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"proportions\",\"type\":\"uint32[]\"}],\"name\":\"mintWithNewHat\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"mintAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"hatID\",\"type\":\"uint256\"}],\"name\":\"mintWithSelectedHat\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"payInterest\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"receivedLoanOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"receivedSavingsOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"redeemAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemTo\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"redeemTokens\",\"type\":\"uint256\"}],\"name\":\"redeemAndTransfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"redeemTo\",\"type\":\"address\"}],\"name\":\"redeemAndTransferAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"savingAssetConversionRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"token\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"}],\"name\":\"transferAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"src\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"dst\",\"type\":\"address\"}],\"name\":\"transferAllFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{\"allowance(address,address)\":{\"details\":\"Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default.     * This value changes when {approve} or {transferFrom} are called.\"},\"approve(address,uint256)\":{\"details\":\"Sets `amount` as the allowance of `spender` over the caller's tokens.     * Returns a boolean value indicating whether the operation succeeded.     * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729     * Emits an {Approval} event.\"},\"balanceOf(address)\":{\"details\":\"Returns the amount of tokens owned by `account`.\"},\"changeHat(uint256)\":{\"params\":{\"hatID\":\"The id of the Hat\"},\"return\":\"bool true=success, otherwise a failure\"},\"createHat(address[],uint32[],bool)\":{\"params\":{\"doChangeHat\":\"Should the hat of the `msg.sender` be switched to the new one\",\"proportions\":\"Relative proportions of benefits received by the recipients\",\"recipients\":\"List of beneficial recipients\"},\"return\":\"uint256 ID of the newly creatd Hat.\"},\"getAccountStats(address)\":{\"params\":{\"owner\":\"Account owner address\"},\"return\":\"account stats\"},\"getCurrentSavingStrategy()\":{\"return\":\"Saving strategy address\"},\"getGlobalStats()\":{\"return\":\"global stats\"},\"getHatByAddress(address)\":{\"params\":{\"owner\":\"Account owner address\"},\"return\":\"hatID Hat IDrecipients Hat recipientsproportions Hat recipient's relative proportions\"},\"getHatByID(uint256)\":{\"params\":{\"hatID\":\"Hat ID\"},\"return\":\"recipients Hat recipientsproportions Hat recipient's relative proportions\"},\"getHatStats(uint256)\":{\"params\":{\"hatID\":\"Hat ID\"},\"return\":\"hat stats\"},\"getSavingAssetBalance()\":{\"return\":\"rAmount Balance in redeemable amountsOriginalAmount Balance in native amount of the strategy\"},\"interestPayableOf(address)\":{\"params\":{\"owner\":\"Account owner address\"},\"return\":\"amount\"},\"mint(uint256)\":{\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\"},\"return\":\"bool true=success, otherwise a failure\"},\"mintWithNewHat(uint256,address[],uint32[])\":{\"params\":{\"mintAmount\":\"The amount of the underlying asset to supply\",\"proportions\":\"Relative proportions of benefits received by the recipients\"},\"return\":\"bool true=success, otherwise a failure\"},\"mintWithSelectedHat(uint256,uint256)\":{\"params\":{\"hatID\":\"The id of the selected Hat\"},\"return\":\"bool true=success, otherwise a failure\"},\"payInterest(address)\":{\"params\":{\"owner\":\"Account owner address\"},\"return\":\"bool true=success, otherwise a failure     * Anyone can trigger the interest distribution on behalf of the recipient, due to the fact that the recipient can be a contract code that has not implemented the interaction with the rToken contract internally`.     * A interest lock-up period may apply, in order to mitigate the \\\"hat inheritance scam\\\".\"},\"receivedLoanOf(address)\":{\"params\":{\"owner\":\"Account owner address\"},\"return\":\"amount\"},\"receivedSavingsOf(address)\":{\"params\":{\"owner\":\"Account owner address\"}},\"redeem(uint256)\":{\"params\":{\"redeemTokens\":\"The number of rTokens to redeem into underlying\"},\"return\":\"bool true=success, otherwise a failure\"},\"redeemAll()\":{\"return\":\"bool true=success, otherwise a failure\"},\"redeemAndTransfer(address,uint256)\":{\"params\":{\"redeemTo\":\"Destination address to send the redeemed tokens to\",\"redeemTokens\":\"The number of rTokens to redeem into underlying\"},\"return\":\"bool true=success, otherwise a failure\"},\"redeemAndTransferAll(address)\":{\"params\":{\"redeemTo\":\"Destination address to send the redeemed tokens to\"},\"return\":\"bool true=success, otherwise a failure\"},\"savingAssetConversionRate()\":{\"details\":\"About the saving asset original to internal conversaioon rate:     ///      - It has 18 decimals      - It starts with value 1      - Each strategy switching results a new conversion rate     /// NOTE:     /// 1. The reason there is an exchange rate is that, each time the    allocation strategy is switched, the unit of the original amount gets    changed, it is impossible to change all the internal savings    accounting entries for all accounts, hence instead a conversaion rate    is used to simplify the process. 2. internalSavings == originalSavings * savingAssetConversionRate\"},\"totalSupply()\":{\"details\":\"Returns the amount of tokens in existence.\"},\"transfer(address,uint256)\":{\"details\":\"Moves `amount` tokens from the caller's account to `recipient`.     * Returns a boolean value indicating whether the operation succeeded.     * Emits a {Transfer} event.\"},\"transferAll(address)\":{\"params\":{\"dst\":\"The destination address.\"},\"return\":\"bool true=success, otherwise a failure\"},\"transferAllFrom(address,address)\":{\"params\":{\"dst\":\"The destination address.\",\"src\":\"The source address which approved the msg.sender to spend\"},\"return\":\"bool true=success, otherwise a failure\"},\"transferFrom(address,address,uint256)\":{\"details\":\"Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance.     * Returns a boolean value indicating whether the operation succeeded.     * Emits a {Transfer} event.\"}}},\"userdoc\":{\"methods\":{\"changeHat(uint256)\":{\"notice\":\"Change the hat for `msg.sender`\"},\"createHat(address[],uint32[],bool)\":{\"notice\":\"Create a new Hat\"},\"decimals()\":{\"notice\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`).     * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei.     * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"getAccountStats(address)\":{\"notice\":\"Get account stats\"},\"getCurrentSavingStrategy()\":{\"notice\":\"Get the current saving strategy contract\"},\"getGlobalStats()\":{\"notice\":\"Get global stats\"},\"getHatByAddress(address)\":{\"notice\":\"Get the hatID of the owner and the hat structure\"},\"getHatByID(uint256)\":{\"notice\":\"Get the hat structure\"},\"getHatStats(uint256)\":{\"notice\":\"Get hat stats\"},\"getMaximumHatID()\":{\"notice\":\"Get the maximum hatID in the system\"},\"getSavingAssetBalance()\":{\"notice\":\"Get saving asset balance for specific saving strategy\"},\"ias()\":{\"notice\":\"Get current saving strategy\"},\"interestPayableOf(address)\":{\"notice\":\"Get the current interest balance of the owner. It is equivalent of: receivedSavings - receivedLoan - freeBalance\"},\"mint(uint256)\":{\"notice\":\"Sender supplies assets into the market and receives rTokens in exchange\"},\"mintWithNewHat(uint256,address[],uint32[])\":{\"notice\":\"Sender supplies assets into the market and receives rTokens in exchange        Also setting the a new hat for the account.\"},\"mintWithSelectedHat(uint256,uint256)\":{\"notice\":\"Sender supplies assets into the market and receives rTokens in exchange        Also setting the a selected hat for the account.\"},\"name()\":{\"notice\":\"Returns the name of the token.\"},\"payInterest(address)\":{\"notice\":\"pay interest to the owner\"},\"receivedLoanOf(address)\":{\"notice\":\"Amount of token loaned to the recipient along with the savings        assets.\"},\"receivedSavingsOf(address)\":{\"notice\":\"Amount of saving assets given to the recipient along with the        loans.\"},\"redeem(uint256)\":{\"notice\":\"Sender redeems rTokens in exchange for the underlying asset\"},\"redeemAll()\":{\"notice\":\"Sender redeems all rTokens in exchange for the underlying asset\"},\"redeemAndTransfer(address,uint256)\":{\"notice\":\"Sender redeems rTokens in exchange for the underlying asset then immediately transfer them to a differen user\"},\"redeemAndTransferAll(address)\":{\"notice\":\"Sender redeems all rTokens in exchange for the underlying asset then immediately transfer them to a differen user\"},\"savingAssetConversionRate()\":{\"notice\":\"Saving asset original to internal amount conversion rate. \"},\"symbol()\":{\"notice\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"token()\":{\"notice\":\"/////////////////////////////////////////////////////////////////////////Returning the underlying token\"},\"transferAll(address)\":{\"notice\":\"Moves all tokens from the caller's account to `dst`.\"},\"transferAllFrom(address,address)\":{\"notice\":\"Moves all tokens from `src` account to `dst`.\"}},\"notice\":\"RToken interface a ERC20 interface and one can mint new tokens by     trasfering underlying token into the contract, configure _hats_ for     addresses and pay earned interest in new _rTokens_.\"}},\"settings\":{\"compilationTarget\":{\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/IRToken.sol\":\"IRToken\"},\"evmVersion\":\"petersburg\",\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/IAllocationStrategy.sol\":{\"keccak256\":\"0xe6771d9a3f2c4719d6b2c60cd8abf03686d8cdddf5d359ccf7ab58d17d9e1380\",\"urls\":[\"bzz-raw://80f212859923c044b4ef360dc19776149f2aacbb27c994f6b76b9cc8260a41f7\",\"dweb:/ipfs/QmWPsojno4n63Drh9WvBtCM89aovwDuabHppDh1LVgmgkY\"]},\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/IRToken.sol\":{\"keccak256\":\"0xa7e01f9f70c505d624fe31e53b6b766d0d476c2851fadc1c3e3e19b779b4d2fc\",\"urls\":[\"bzz-raw://417316c44a1591fd07c2254097f98fd4ac0bc352e7035cf57f9df9c22ebde63c\",\"dweb:/ipfs/QmVoRFAMjS7GSjtLCoZJsqXCKygqVW7oas9X1G1WrMNZmE\"]},\"/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/RTokenStructs.sol\":{\"keccak256\":\"0x5c7c3b26d2f6f8fd489b2a326d4658f67e1f4e3cbe03c3a6831dd5103ead41e0\",\"urls\":[\"bzz-raw://991d8988992e169e0faa0d57f16684cc190b33a5b4e028993c9f74f158a8a16d\",\"dweb:/ipfs/QmVYKkdVLb2yuhDx7fMTY8UNFrskX2w3eSyLMnvoBVD3yU\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzz-raw://59fd025151435da35faa8093a5c7a17de02de9d08ad27275c5cdf05050820d91\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]}},\"version\":1}",
  "bytecode": "0x",
  "deployedBytecode": "0x",
  "sourceMap": "",
  "deployedSourceMap": "",
  "source": "/**\n * Because the use of ABIEncoderV2 , the pragma should be locked above 0.5.10 ,\n * as there is a known bug in array storage:\n * https://blog.ethereum.org/2019/06/25/solidity-storage-array-bugs/\n */\npragma solidity >=0.5.10 <0.6.0;\npragma experimental ABIEncoderV2;\n\nimport {RTokenStructs} from \"./RTokenStructs.sol\";\nimport {IAllocationStrategy} from \"./IAllocationStrategy.sol\";\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\n/**\n * @notice RToken interface a ERC20 interface and one can mint new tokens by\n *      trasfering underlying token into the contract, configure _hats_ for\n *      addresses and pay earned interest in new _rTokens_.\n */\ncontract IRToken is RTokenStructs, IERC20 {\n\n    ////////////////////////////////////////////////////////////////////////////\n    // Token details\n    ////////////////////////////////////////////////////////////////////////////\n\n    /// @notice Returning the underlying token\n    function token() external returns (IERC20);\n\n    /**\n     * @notice Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @notice Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @notice Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() external view returns (uint256);\n\n    ////////////////////////////////////////////////////////////////////////////\n    // For external transactions\n    ////////////////////////////////////////////////////////////////////////////\n    /**\n     * @notice Sender supplies assets into the market and receives rTokens in exchange\n     * @param mintAmount The amount of the underlying asset to supply\n     * @return bool true=success, otherwise a failure\n     */\n    function mint(uint256 mintAmount) external returns (bool);\n\n    /**\n     * @notice Sender supplies assets into the market and receives rTokens in exchange\n     *         Also setting the a selected hat for the account.\n     * @param hatID The id of the selected Hat\n     * @return bool true=success, otherwise a failure\n     */\n    function mintWithSelectedHat(uint256 mintAmount, uint256 hatID)\n        external\n        returns (bool);\n\n    /**\n     * @notice Sender supplies assets into the market and receives rTokens in exchange\n     *         Also setting the a new hat for the account.\n     * @param mintAmount The amount of the underlying asset to supply\n     * @param proportions Relative proportions of benefits received by the recipients\n     * @return bool true=success, otherwise a failure\n     */\n    function mintWithNewHat(\n        uint256 mintAmount,\n        address[] calldata recipients,\n        uint32[] calldata proportions\n    ) external returns (bool);\n\n    /**\n     * @notice Moves all tokens from the caller's account to `dst`.\n     * @param dst The destination address.\n     * @return bool true=success, otherwise a failure\n     */\n    function transferAll(address dst) external returns (bool);\n\n    /**\n     * @notice Moves all tokens from `src` account to `dst`.\n     * @param src The source address which approved the msg.sender to spend\n     * @param dst The destination address.\n     * @return bool true=success, otherwise a failure\n     */\n    function transferAllFrom(address src, address dst) external returns (bool);\n\n    /**\n     * @notice Sender redeems rTokens in exchange for the underlying asset\n     * @param redeemTokens The number of rTokens to redeem into underlying\n     * @return bool true=success, otherwise a failure\n     */\n    function redeem(uint256 redeemTokens) external returns (bool);\n\n    /**\n     * @notice Sender redeems all rTokens in exchange for the underlying asset\n     * @return bool true=success, otherwise a failure\n     */\n    function redeemAll() external returns (bool);\n\n    /**\n     * @notice Sender redeems rTokens in exchange for the underlying asset then immediately transfer them to a differen user\n     * @param redeemTo Destination address to send the redeemed tokens to\n     * @param redeemTokens The number of rTokens to redeem into underlying\n     * @return bool true=success, otherwise a failure\n     */\n    function redeemAndTransfer(address redeemTo, uint256 redeemTokens)\n        external\n        returns (bool);\n\n    /**\n     * @notice Sender redeems all rTokens in exchange for the underlying asset then immediately transfer them to a differen user\n     * @param redeemTo Destination address to send the redeemed tokens to\n     * @return bool true=success, otherwise a failure\n     */\n    function redeemAndTransferAll(address redeemTo) external returns (bool);\n\n    /**\n     * @notice Create a new Hat\n     * @param recipients List of beneficial recipients\n     * @param proportions Relative proportions of benefits received by the recipients\n     * @param doChangeHat Should the hat of the `msg.sender` be switched to the new one\n     * @return uint256 ID of the newly creatd Hat.\n     */\n    function createHat(\n        address[] calldata recipients,\n        uint32[] calldata proportions,\n        bool doChangeHat\n    ) external returns (uint256 hatID);\n\n    /**\n     * @notice Change the hat for `msg.sender`\n     * @param hatID The id of the Hat\n     * @return bool true=success, otherwise a failure\n     */\n    function changeHat(uint256 hatID) external returns (bool);\n\n    /**\n     * @notice pay interest to the owner\n     * @param owner Account owner address\n     * @return bool true=success, otherwise a failure\n     *\n     * Anyone can trigger the interest distribution on behalf of the recipient,\n     * due to the fact that the recipient can be a contract code that has not\n     * implemented the interaction with the rToken contract internally`.\n     *\n     * A interest lock-up period may apply, in order to mitigate the \"hat\n     * inheritance scam\".\n     */\n    function payInterest(address owner) external returns (bool);\n\n    ////////////////////////////////////////////////////////////////////////////\n    // Essential info views\n    ////////////////////////////////////////////////////////////////////////////\n    /**\n     * @notice Get the maximum hatID in the system\n     */\n    function getMaximumHatID() external view returns (uint256 hatID);\n\n    /**\n     * @notice Get the hatID of the owner and the hat structure\n     * @param owner Account owner address\n     * @return hatID Hat ID\n     * @return recipients Hat recipients\n     * @return proportions Hat recipient's relative proportions\n     */\n    function getHatByAddress(address owner)\n        external\n        view\n        returns (\n            uint256 hatID,\n            address[] memory recipients,\n            uint32[] memory proportions\n        );\n\n    /**\n     * @notice Get the hat structure\n     * @param hatID Hat ID\n     * @return recipients Hat recipients\n     * @return proportions Hat recipient's relative proportions\n     */\n    function getHatByID(uint256 hatID)\n        external\n        view\n        returns (address[] memory recipients, uint32[] memory proportions);\n\n    /**\n     * @notice Amount of saving assets given to the recipient along with the\n     *         loans.\n     * @param owner Account owner address\n     */\n    function receivedSavingsOf(address owner)\n        external\n        view\n        returns (uint256 amount);\n\n    /**\n     * @notice Amount of token loaned to the recipient along with the savings\n     *         assets.\n     * @param owner Account owner address\n     * @return amount\n     */\n    function receivedLoanOf(address owner)\n        external\n        view\n        returns (uint256 amount);\n\n    /**\n     * @notice Get the current interest balance of the owner.\n               It is equivalent of: receivedSavings - receivedLoan - freeBalance\n     * @param owner Account owner address\n     * @return amount\n     */\n    function interestPayableOf(address owner)\n        external\n        view\n        returns (uint256 amount);\n\n    /// @notice Get current saving strategy\n    function ias() external returns (IAllocationStrategy);\n\n    /// @notice Saving asset original to internal amount conversion rate.\n    ///\n    /// @dev About the saving asset original to internal conversaioon rate:\n    ///\n    ///      - It has 18 decimals\n    ///      - It starts with value 1\n    ///      - Each strategy switching results a new conversion rate\n    ///\n    /// NOTE:\n    ///\n    /// 1. The reason there is an exchange rate is that, each time the\n    ///    allocation strategy is switched, the unit of the original amount gets\n    ///    changed, it is impossible to change all the internal savings\n    ///    accounting entries for all accounts, hence instead a conversaion rate\n    ///    is used to simplify the process.\n    /// 2. internalSavings == originalSavings * savingAssetConversionRate\n    function savingAssetConversionRate() external returns (uint256);\n\n    ////////////////////////////////////////////////////////////////////////////\n    // statistics views\n    ////////////////////////////////////////////////////////////////////////////\n    /**\n     * @notice Get the current saving strategy contract\n     * @return Saving strategy address\n     */\n    function getCurrentSavingStrategy() external view returns (address);\n\n    /**\n    * @notice Get saving asset balance for specific saving strategy\n    * @return rAmount Balance in redeemable amount\n    * @return sOriginalAmount Balance in native amount of the strategy\n    */\n    function getSavingAssetBalance()\n        external\n        view\n        returns (uint256 rAmount, uint256 sOriginalAmount);\n\n    /**\n    * @notice Get global stats\n    * @return global stats\n    */\n    function getGlobalStats() external view returns (GlobalStats memory);\n\n    /**\n    * @notice Get account stats\n    * @param owner Account owner address\n    * @return account stats\n    */\n    function getAccountStats(address owner)\n        external\n        view\n        returns (AccountStatsView memory);\n\n    /**\n    * @notice Get hat stats\n    * @param hatID Hat ID\n    * @return hat stats\n    */\n    function getHatStats(uint256 hatID)\n        external\n        view\n        returns (HatStatsView memory);\n\n    ////////////////////////////////////////////////////////////////////////////\n    // Events\n    ////////////////////////////////////////////////////////////////////////////\n    /**\n     * @notice Event emitted when loans get transferred\n     */\n    event LoansTransferred(\n        address indexed owner,\n        address indexed recipient,\n        uint256 indexed hatId,\n        bool isDistribution,\n        uint256 redeemableAmount,\n        uint256 internalSavingsAmount);\n\n    /**\n     * @notice Event emitted when interest paid\n     */\n    event InterestPaid(address indexed recipient, uint256 amount);\n\n    /**\n     * @notice A new hat is created\n     */\n    event HatCreated(uint256 indexed hatID);\n\n    /**\n     * @notice Hat is changed for the account\n     */\n    event HatChanged(address indexed account, uint256 indexed oldHatID, uint256 indexed newHatID);\n}\n",
  "sourcePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/IRToken.sol",
  "ast": {
    "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/IRToken.sol",
    "exportedSymbols": {
      "IRToken": [
        6390
      ]
    },
    "id": 6391,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6135,
        "literals": [
          "solidity",
          ">=",
          "0.5",
          ".10",
          "<",
          "0.6",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "202:32:13"
      },
      {
        "id": 6136,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "235:33:13"
      },
      {
        "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/RTokenStructs.sol",
        "file": "./RTokenStructs.sol",
        "id": 6138,
        "nodeType": "ImportDirective",
        "scope": 6391,
        "sourceUnit": 9409,
        "src": "270:50:13",
        "symbolAliases": [
          {
            "foreign": 6137,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/IAllocationStrategy.sol",
        "file": "./IAllocationStrategy.sol",
        "id": 6140,
        "nodeType": "ImportDirective",
        "scope": 6391,
        "sourceUnit": 6134,
        "src": "321:62:13",
        "symbolAliases": [
          {
            "foreign": 6139,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 6142,
        "nodeType": "ImportDirective",
        "scope": 6391,
        "sourceUnit": 11471,
        "src": "384:70:13",
        "symbolAliases": [
          {
            "foreign": 6141,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 6143,
              "name": "RTokenStructs",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 9408,
              "src": "697:13:13",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_RTokenStructs_$9408",
                "typeString": "contract RTokenStructs"
              }
            },
            "id": 6144,
            "nodeType": "InheritanceSpecifier",
            "src": "697:13:13"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 6145,
              "name": "IERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 11470,
              "src": "712:6:13",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IERC20_$11470",
                "typeString": "contract IERC20"
              }
            },
            "id": 6146,
            "nodeType": "InheritanceSpecifier",
            "src": "712:6:13"
          }
        ],
        "contractDependencies": [
          9408,
          11470
        ],
        "contractKind": "contract",
        "documentation": "@notice RToken interface a ERC20 interface and one can mint new tokens by\n     trasfering underlying token into the contract, configure _hats_ for\n     addresses and pay earned interest in new _rTokens_.",
        "fullyImplemented": false,
        "id": 6390,
        "linearizedBaseContracts": [
          6390,
          11470,
          9408
        ],
        "name": "IRToken",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": null,
            "documentation": "/////////////////////////////////////////////////////////////////////////\n @notice Returning the underlying token",
            "id": 6151,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "token",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6147,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "971:2:13"
            },
            "returnParameters": {
              "id": 6150,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6149,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6151,
                  "src": "992:6:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$11470",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6148,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11470,
                    "src": "992:6:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$11470",
                      "typeString": "contract IERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "991:8:13"
            },
            "scope": 6390,
            "src": "957:43:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Returns the name of the token.",
            "id": 6156,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "name",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6152,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1081:2:13"
            },
            "returnParameters": {
              "id": 6155,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6154,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6156,
                  "src": "1107:13:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 6153,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1107:6:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1106:15:13"
            },
            "scope": 6390,
            "src": "1068:54:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Returns the symbol of the token, usually a shorter version of the\nname.",
            "id": 6161,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "symbol",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6157,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1253:2:13"
            },
            "returnParameters": {
              "id": 6160,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6159,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6161,
                  "src": "1279:13:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 6158,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1279:6:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1278:15:13"
            },
            "scope": 6390,
            "src": "1238:56:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Returns the number of decimals used to get its user representation.\nFor example, if `decimals` equals `2`, a balance of `505` tokens should\nbe displayed to a user as `5,05` (`505 / 10 ** 2`).\n     * Tokens usually opt for a value of 18, imitating the relationship between\nEther and Wei.\n     * NOTE: This information is only used for _display_ purposes: it in\nno way affects any of the arithmetic of the contract, including\n{IERC20-balanceOf} and {IERC20-transfer}.",
            "id": 6166,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "decimals",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6162,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1863:2:13"
            },
            "returnParameters": {
              "id": 6165,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6164,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6166,
                  "src": "1889:7:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6163,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1889:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1888:9:13"
            },
            "scope": 6390,
            "src": "1846:52:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender supplies assets into the market and receives rTokens in exchange\n@param mintAmount The amount of the underlying asset to supply\n@return bool true=success, otherwise a failure",
            "id": 6173,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "mint",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6169,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6168,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2340:18:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6167,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2340:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2339:20:13"
            },
            "returnParameters": {
              "id": 6172,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6171,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2378:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6170,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2378:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2377:6:13"
            },
            "scope": 6390,
            "src": "2326:58:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender supplies assets into the market and receives rTokens in exchange\n        Also setting the a selected hat for the account.\n@param hatID The id of the selected Hat\n@return bool true=success, otherwise a failure",
            "id": 6182,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "mintWithSelectedHat",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6178,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6175,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6182,
                  "src": "2687:18:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6174,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2687:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6177,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6182,
                  "src": "2707:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6176,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2707:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2686:35:13"
            },
            "returnParameters": {
              "id": 6181,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6180,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6182,
                  "src": "2756:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6179,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2756:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2755:6:13"
            },
            "scope": 6390,
            "src": "2658:104:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender supplies assets into the market and receives rTokens in exchange\n        Also setting the a new hat for the account.\n@param mintAmount The amount of the underlying asset to supply\n@param proportions Relative proportions of benefits received by the recipients\n@return bool true=success, otherwise a failure",
            "id": 6195,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "mintWithNewHat",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6191,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6184,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "3173:18:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6183,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3173:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6187,
                  "name": "recipients",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "3201:29:13",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6185,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "3201:7:13",
                      "stateMutability": "nonpayable",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 6186,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "3201:9:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6190,
                  "name": "proportions",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "3240:29:13",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint32_$dyn_calldata_ptr",
                    "typeString": "uint32[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6188,
                      "name": "uint32",
                      "nodeType": "ElementaryTypeName",
                      "src": "3240:6:13",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "id": 6189,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "3240:8:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr",
                      "typeString": "uint32[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3163:112:13"
            },
            "returnParameters": {
              "id": 6194,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6193,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "3294:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6192,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3294:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3293:6:13"
            },
            "scope": 6390,
            "src": "3140:160:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Moves all tokens from the caller's account to `dst`.\n@param dst The destination address.\n@return bool true=success, otherwise a failure",
            "id": 6202,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "transferAll",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6198,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6197,
                  "name": "dst",
                  "nodeType": "VariableDeclaration",
                  "scope": 6202,
                  "src": "3508:11:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6196,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3508:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3507:13:13"
            },
            "returnParameters": {
              "id": 6201,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6200,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6202,
                  "src": "3539:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6199,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3539:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3538:6:13"
            },
            "scope": 6390,
            "src": "3487:58:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Moves all tokens from `src` account to `dst`.\n@param src The source address which approved the msg.sender to spend\n@param dst The destination address.\n@return bool true=success, otherwise a failure",
            "id": 6211,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "transferAllFrom",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6207,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6204,
                  "name": "src",
                  "nodeType": "VariableDeclaration",
                  "scope": 6211,
                  "src": "3826:11:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6203,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3826:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6206,
                  "name": "dst",
                  "nodeType": "VariableDeclaration",
                  "scope": 6211,
                  "src": "3839:11:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6205,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3839:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3825:26:13"
            },
            "returnParameters": {
              "id": 6210,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6209,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6211,
                  "src": "3870:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6208,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3870:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3869:6:13"
            },
            "scope": 6390,
            "src": "3801:75:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender redeems rTokens in exchange for the underlying asset\n@param redeemTokens The number of rTokens to redeem into underlying\n@return bool true=success, otherwise a failure",
            "id": 6218,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeem",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6214,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6213,
                  "name": "redeemTokens",
                  "nodeType": "VariableDeclaration",
                  "scope": 6218,
                  "src": "4118:20:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6212,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4118:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4117:22:13"
            },
            "returnParameters": {
              "id": 6217,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6216,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6218,
                  "src": "4158:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6215,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4158:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4157:6:13"
            },
            "scope": 6390,
            "src": "4102:62:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender redeems all rTokens in exchange for the underlying asset\n@return bool true=success, otherwise a failure",
            "id": 6223,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeemAll",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6219,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4337:2:13"
            },
            "returnParameters": {
              "id": 6222,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6221,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6223,
                  "src": "4358:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6220,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4358:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4357:6:13"
            },
            "scope": 6390,
            "src": "4319:45:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender redeems rTokens in exchange for the underlying asset then immediately transfer them to a differen user\n@param redeemTo Destination address to send the redeemed tokens to\n@param redeemTokens The number of rTokens to redeem into underlying\n@return bool true=success, otherwise a failure",
            "id": 6232,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeemAndTransfer",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6228,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6225,
                  "name": "redeemTo",
                  "nodeType": "VariableDeclaration",
                  "scope": 6232,
                  "src": "4741:16:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6224,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4741:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6227,
                  "name": "redeemTokens",
                  "nodeType": "VariableDeclaration",
                  "scope": 6232,
                  "src": "4759:20:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6226,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4759:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4740:40:13"
            },
            "returnParameters": {
              "id": 6231,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6230,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6232,
                  "src": "4815:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6229,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4815:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4814:6:13"
            },
            "scope": 6390,
            "src": "4714:107:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender redeems all rTokens in exchange for the underlying asset then immediately transfer them to a differen user\n@param redeemTo Destination address to send the redeemed tokens to\n@return bool true=success, otherwise a failure",
            "id": 6239,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeemAndTransferAll",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6235,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6234,
                  "name": "redeemTo",
                  "nodeType": "VariableDeclaration",
                  "scope": 6239,
                  "src": "5130:16:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6233,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5130:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5129:18:13"
            },
            "returnParameters": {
              "id": 6238,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6237,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6239,
                  "src": "5166:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6236,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5166:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5165:6:13"
            },
            "scope": 6390,
            "src": "5100:72:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Create a new Hat\n@param recipients List of beneficial recipients\n@param proportions Relative proportions of benefits received by the recipients\n@param doChangeHat Should the hat of the `msg.sender` be switched to the new one\n@return uint256 ID of the newly creatd Hat.",
            "id": 6252,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "createHat",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6248,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6242,
                  "name": "recipients",
                  "nodeType": "VariableDeclaration",
                  "scope": 6252,
                  "src": "5534:29:13",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6240,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "5534:7:13",
                      "stateMutability": "nonpayable",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 6241,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "5534:9:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6245,
                  "name": "proportions",
                  "nodeType": "VariableDeclaration",
                  "scope": 6252,
                  "src": "5573:29:13",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint32_$dyn_calldata_ptr",
                    "typeString": "uint32[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6243,
                      "name": "uint32",
                      "nodeType": "ElementaryTypeName",
                      "src": "5573:6:13",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "id": 6244,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "5573:8:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr",
                      "typeString": "uint32[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6247,
                  "name": "doChangeHat",
                  "nodeType": "VariableDeclaration",
                  "scope": 6252,
                  "src": "5612:16:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6246,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5612:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5524:110:13"
            },
            "returnParameters": {
              "id": 6251,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6250,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6252,
                  "src": "5653:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6249,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5653:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5652:15:13"
            },
            "scope": 6390,
            "src": "5506:162:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Change the hat for `msg.sender`\n@param hatID The id of the Hat\n@return bool true=success, otherwise a failure",
            "id": 6259,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "changeHat",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6255,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6254,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6259,
                  "src": "5848:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6253,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5848:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5847:15:13"
            },
            "returnParameters": {
              "id": 6258,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6257,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6259,
                  "src": "5881:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6256,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5881:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5880:6:13"
            },
            "scope": 6390,
            "src": "5829:58:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice pay interest to the owner\n@param owner Account owner address\n@return bool true=success, otherwise a failure\n     * Anyone can trigger the interest distribution on behalf of the recipient,\ndue to the fact that the recipient can be a contract code that has not\nimplemented the interaction with the rToken contract internally`.\n     * A interest lock-up period may apply, in order to mitigate the \"hat\ninheritance scam\".",
            "id": 6266,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "payInterest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6262,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6261,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6266,
                  "src": "6412:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6260,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6412:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6411:15:13"
            },
            "returnParameters": {
              "id": 6265,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6264,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6266,
                  "src": "6445:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6263,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "6445:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6444:6:13"
            },
            "scope": 6390,
            "src": "6391:60:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the maximum hatID in the system",
            "id": 6271,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getMaximumHatID",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6267,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6738:2:13"
            },
            "returnParameters": {
              "id": 6270,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6269,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6271,
                  "src": "6764:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6268,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6764:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6763:15:13"
            },
            "scope": 6390,
            "src": "6714:65:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the hatID of the owner and the hat structure\n@param owner Account owner address\n@return hatID Hat ID\n@return recipients Hat recipients\n@return proportions Hat recipient's relative proportions",
            "id": 6284,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getHatByAddress",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6274,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6273,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6284,
                  "src": "7065:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6272,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7065:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7064:15:13"
            },
            "returnParameters": {
              "id": 6283,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6276,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6284,
                  "src": "7140:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6275,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7140:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6279,
                  "name": "recipients",
                  "nodeType": "VariableDeclaration",
                  "scope": 6284,
                  "src": "7167:27:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6277,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "7167:7:13",
                      "stateMutability": "nonpayable",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 6278,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "7167:9:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6282,
                  "name": "proportions",
                  "nodeType": "VariableDeclaration",
                  "scope": 6284,
                  "src": "7208:27:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr",
                    "typeString": "uint32[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6280,
                      "name": "uint32",
                      "nodeType": "ElementaryTypeName",
                      "src": "7208:6:13",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "id": 6281,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "7208:8:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr",
                      "typeString": "uint32[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7126:119:13"
            },
            "scope": 6390,
            "src": "7040:206:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the hat structure\n@param hatID Hat ID\n@return recipients Hat recipients\n@return proportions Hat recipient's relative proportions",
            "id": 6295,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getHatByID",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6287,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6286,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6295,
                  "src": "7457:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6285,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7457:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7456:15:13"
            },
            "returnParameters": {
              "id": 6294,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6290,
                  "name": "recipients",
                  "nodeType": "VariableDeclaration",
                  "scope": 6295,
                  "src": "7519:27:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6288,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "7519:7:13",
                      "stateMutability": "nonpayable",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 6289,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "7519:9:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6293,
                  "name": "proportions",
                  "nodeType": "VariableDeclaration",
                  "scope": 6295,
                  "src": "7548:27:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr",
                    "typeString": "uint32[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6291,
                      "name": "uint32",
                      "nodeType": "ElementaryTypeName",
                      "src": "7548:6:13",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "id": 6292,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "7548:8:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr",
                      "typeString": "uint32[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7518:58:13"
            },
            "scope": 6390,
            "src": "7437:140:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Amount of saving assets given to the recipient along with the\n        loans.\n@param owner Account owner address",
            "id": 6302,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "receivedSavingsOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6298,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6297,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6302,
                  "src": "7767:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6296,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7767:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7766:15:13"
            },
            "returnParameters": {
              "id": 6301,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6300,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6302,
                  "src": "7829:14:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6299,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7829:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7828:16:13"
            },
            "scope": 6390,
            "src": "7740:105:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Amount of token loaned to the recipient along with the savings\n        assets.\n@param owner Account owner address\n@return amount",
            "id": 6309,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "receivedLoanOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6305,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6304,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6309,
                  "src": "8056:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6303,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8056:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8055:15:13"
            },
            "returnParameters": {
              "id": 6308,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6307,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6309,
                  "src": "8118:14:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6306,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8118:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8117:16:13"
            },
            "scope": 6390,
            "src": "8032:102:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the current interest balance of the owner.\nIt is equivalent of: receivedSavings - receivedLoan - freeBalance\n@param owner Account owner address\n@return amount",
            "id": 6316,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "interestPayableOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6312,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6311,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6316,
                  "src": "8390:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6310,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8390:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8389:15:13"
            },
            "returnParameters": {
              "id": 6315,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6314,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6316,
                  "src": "8452:14:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6313,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8452:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8451:16:13"
            },
            "scope": 6390,
            "src": "8363:105:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get current saving strategy",
            "id": 6321,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "ias",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6317,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8530:2:13"
            },
            "returnParameters": {
              "id": 6320,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6319,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "8551:19:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IAllocationStrategy_$6133",
                    "typeString": "contract IAllocationStrategy"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6318,
                    "name": "IAllocationStrategy",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6133,
                    "src": "8551:19:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IAllocationStrategy_$6133",
                      "typeString": "contract IAllocationStrategy"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8550:21:13"
            },
            "scope": 6390,
            "src": "8518:54:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Saving asset original to internal amount conversion rate.\n\n    /// @dev About the saving asset original to internal conversaioon rate:\n\n    ///      - It has 18 decimals\n      - It starts with value 1\n      - Each strategy switching results a new conversion rate\n\n    /// NOTE:\n\n    /// 1. The reason there is an exchange rate is that, each time the\n    allocation strategy is switched, the unit of the original amount gets\n    changed, it is impossible to change all the internal savings\n    accounting entries for all accounts, hence instead a conversaion rate\n    is used to simplify the process.\n 2. internalSavings == originalSavings * savingAssetConversionRate",
            "id": 6326,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "savingAssetConversionRate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6322,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "9372:2:13"
            },
            "returnParameters": {
              "id": 6325,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6324,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6326,
                  "src": "9393:7:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6323,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9393:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9392:9:13"
            },
            "scope": 6390,
            "src": "9338:64:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the current saving strategy contract\n@return Saving strategy address",
            "id": 6331,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getCurrentSavingStrategy",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6327,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "9738:2:13"
            },
            "returnParameters": {
              "id": 6330,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6329,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6331,
                  "src": "9764:7:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6328,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "9764:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9763:9:13"
            },
            "scope": 6390,
            "src": "9705:68:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get saving asset balance for specific saving strategy\n@return rAmount Balance in redeemable amount\n@return sOriginalAmount Balance in native amount of the strategy",
            "id": 6338,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getSavingAssetBalance",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6332,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10014:2:13"
            },
            "returnParameters": {
              "id": 6337,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6334,
                  "name": "rAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6338,
                  "src": "10064:15:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6333,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10064:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6336,
                  "name": "sOriginalAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6338,
                  "src": "10081:23:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6335,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10081:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10063:42:13"
            },
            "scope": 6390,
            "src": "9984:122:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get global stats\n@return global stats",
            "id": 6343,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getGlobalStats",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6339,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10208:2:13"
            },
            "returnParameters": {
              "id": 6342,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6341,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6343,
                  "src": "10234:18:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_GlobalStats_$9351_memory_ptr",
                    "typeString": "struct RTokenStructs.GlobalStats"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6340,
                    "name": "GlobalStats",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 9351,
                    "src": "10234:11:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_GlobalStats_$9351_storage_ptr",
                      "typeString": "struct RTokenStructs.GlobalStats"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10233:20:13"
            },
            "scope": 6390,
            "src": "10185:69:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get account stats\n@param owner Account owner address\n@return account stats",
            "id": 6350,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getAccountStats",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6346,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6345,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6350,
                  "src": "10401:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6344,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "10401:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10400:15:13"
            },
            "returnParameters": {
              "id": 6349,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6348,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6350,
                  "src": "10463:23:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_AccountStatsView_$9368_memory_ptr",
                    "typeString": "struct RTokenStructs.AccountStatsView"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6347,
                    "name": "AccountStatsView",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 9368,
                    "src": "10463:16:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_AccountStatsView_$9368_storage_ptr",
                      "typeString": "struct RTokenStructs.AccountStatsView"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10462:25:13"
            },
            "scope": 6390,
            "src": "10376:112:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get hat stats\n@param hatID Hat ID\n@return hat stats",
            "id": 6357,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getHatStats",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6353,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6352,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6357,
                  "src": "10608:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6351,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10608:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10607:15:13"
            },
            "returnParameters": {
              "id": 6356,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6355,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6357,
                  "src": "10670:19:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_HatStatsView_$9378_memory_ptr",
                    "typeString": "struct RTokenStructs.HatStatsView"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6354,
                    "name": "HatStatsView",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 9378,
                    "src": "10670:12:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_HatStatsView_$9378_storage_ptr",
                      "typeString": "struct RTokenStructs.HatStatsView"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10669:21:13"
            },
            "scope": 6390,
            "src": "10587:104:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": "@notice Event emitted when loans get transferred",
            "id": 6371,
            "name": "LoansTransferred",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 6370,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6359,
                  "indexed": true,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "10977:21:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6358,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "10977:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6361,
                  "indexed": true,
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11008:25:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6360,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "11008:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6363,
                  "indexed": true,
                  "name": "hatId",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11043:21:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6362,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11043:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6365,
                  "indexed": false,
                  "name": "isDistribution",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11074:19:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6364,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "11074:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6367,
                  "indexed": false,
                  "name": "redeemableAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11103:24:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6366,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11103:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6369,
                  "indexed": false,
                  "name": "internalSavingsAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11137:29:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6368,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11137:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10967:200:13"
            },
            "src": "10945:223:13"
          },
          {
            "anonymous": false,
            "documentation": "@notice Event emitted when interest paid",
            "id": 6377,
            "name": "InterestPaid",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 6376,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6373,
                  "indexed": true,
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 6377,
                  "src": "11257:25:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6372,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "11257:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6375,
                  "indexed": false,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6377,
                  "src": "11284:14:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6374,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11284:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11256:43:13"
            },
            "src": "11238:62:13"
          },
          {
            "anonymous": false,
            "documentation": "@notice A new hat is created",
            "id": 6381,
            "name": "HatCreated",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 6380,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6379,
                  "indexed": true,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6381,
                  "src": "11375:21:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6378,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11375:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11374:23:13"
            },
            "src": "11358:40:13"
          },
          {
            "anonymous": false,
            "documentation": "@notice Hat is changed for the account",
            "id": 6389,
            "name": "HatChanged",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 6388,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6383,
                  "indexed": true,
                  "name": "account",
                  "nodeType": "VariableDeclaration",
                  "scope": 6389,
                  "src": "11483:23:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6382,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "11483:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6385,
                  "indexed": true,
                  "name": "oldHatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6389,
                  "src": "11508:24:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6384,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11508:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6387,
                  "indexed": true,
                  "name": "newHatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6389,
                  "src": "11534:24:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6386,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11534:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11482:77:13"
            },
            "src": "11466:94:13"
          }
        ],
        "scope": 6391,
        "src": "677:10885:13"
      }
    ],
    "src": "202:11361:13"
  },
  "legacyAST": {
    "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/IRToken.sol",
    "exportedSymbols": {
      "IRToken": [
        6390
      ]
    },
    "id": 6391,
    "nodeType": "SourceUnit",
    "nodes": [
      {
        "id": 6135,
        "literals": [
          "solidity",
          ">=",
          "0.5",
          ".10",
          "<",
          "0.6",
          ".0"
        ],
        "nodeType": "PragmaDirective",
        "src": "202:32:13"
      },
      {
        "id": 6136,
        "literals": [
          "experimental",
          "ABIEncoderV2"
        ],
        "nodeType": "PragmaDirective",
        "src": "235:33:13"
      },
      {
        "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/RTokenStructs.sol",
        "file": "./RTokenStructs.sol",
        "id": 6138,
        "nodeType": "ImportDirective",
        "scope": 6391,
        "sourceUnit": 9409,
        "src": "270:50:13",
        "symbolAliases": [
          {
            "foreign": 6137,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "/home/runner/work/rtoken-contracts/rtoken-contracts/packages/contracts/contracts/IAllocationStrategy.sol",
        "file": "./IAllocationStrategy.sol",
        "id": 6140,
        "nodeType": "ImportDirective",
        "scope": 6391,
        "sourceUnit": 6134,
        "src": "321:62:13",
        "symbolAliases": [
          {
            "foreign": 6139,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol",
        "id": 6142,
        "nodeType": "ImportDirective",
        "scope": 6391,
        "sourceUnit": 11471,
        "src": "384:70:13",
        "symbolAliases": [
          {
            "foreign": 6141,
            "local": null
          }
        ],
        "unitAlias": ""
      },
      {
        "baseContracts": [
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 6143,
              "name": "RTokenStructs",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 9408,
              "src": "697:13:13",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_RTokenStructs_$9408",
                "typeString": "contract RTokenStructs"
              }
            },
            "id": 6144,
            "nodeType": "InheritanceSpecifier",
            "src": "697:13:13"
          },
          {
            "arguments": null,
            "baseName": {
              "contractScope": null,
              "id": 6145,
              "name": "IERC20",
              "nodeType": "UserDefinedTypeName",
              "referencedDeclaration": 11470,
              "src": "712:6:13",
              "typeDescriptions": {
                "typeIdentifier": "t_contract$_IERC20_$11470",
                "typeString": "contract IERC20"
              }
            },
            "id": 6146,
            "nodeType": "InheritanceSpecifier",
            "src": "712:6:13"
          }
        ],
        "contractDependencies": [
          9408,
          11470
        ],
        "contractKind": "contract",
        "documentation": "@notice RToken interface a ERC20 interface and one can mint new tokens by\n     trasfering underlying token into the contract, configure _hats_ for\n     addresses and pay earned interest in new _rTokens_.",
        "fullyImplemented": false,
        "id": 6390,
        "linearizedBaseContracts": [
          6390,
          11470,
          9408
        ],
        "name": "IRToken",
        "nodeType": "ContractDefinition",
        "nodes": [
          {
            "body": null,
            "documentation": "/////////////////////////////////////////////////////////////////////////\n @notice Returning the underlying token",
            "id": 6151,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "token",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6147,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "971:2:13"
            },
            "returnParameters": {
              "id": 6150,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6149,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6151,
                  "src": "992:6:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IERC20_$11470",
                    "typeString": "contract IERC20"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6148,
                    "name": "IERC20",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 11470,
                    "src": "992:6:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IERC20_$11470",
                      "typeString": "contract IERC20"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "991:8:13"
            },
            "scope": 6390,
            "src": "957:43:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Returns the name of the token.",
            "id": 6156,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "name",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6152,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1081:2:13"
            },
            "returnParameters": {
              "id": 6155,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6154,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6156,
                  "src": "1107:13:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 6153,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1107:6:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1106:15:13"
            },
            "scope": 6390,
            "src": "1068:54:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Returns the symbol of the token, usually a shorter version of the\nname.",
            "id": 6161,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "symbol",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6157,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1253:2:13"
            },
            "returnParameters": {
              "id": 6160,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6159,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6161,
                  "src": "1279:13:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_string_memory_ptr",
                    "typeString": "string"
                  },
                  "typeName": {
                    "id": 6158,
                    "name": "string",
                    "nodeType": "ElementaryTypeName",
                    "src": "1279:6:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_string_storage_ptr",
                      "typeString": "string"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1278:15:13"
            },
            "scope": 6390,
            "src": "1238:56:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Returns the number of decimals used to get its user representation.\nFor example, if `decimals` equals `2`, a balance of `505` tokens should\nbe displayed to a user as `5,05` (`505 / 10 ** 2`).\n     * Tokens usually opt for a value of 18, imitating the relationship between\nEther and Wei.\n     * NOTE: This information is only used for _display_ purposes: it in\nno way affects any of the arithmetic of the contract, including\n{IERC20-balanceOf} and {IERC20-transfer}.",
            "id": 6166,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "decimals",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6162,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "1863:2:13"
            },
            "returnParameters": {
              "id": 6165,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6164,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6166,
                  "src": "1889:7:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6163,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "1889:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "1888:9:13"
            },
            "scope": 6390,
            "src": "1846:52:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender supplies assets into the market and receives rTokens in exchange\n@param mintAmount The amount of the underlying asset to supply\n@return bool true=success, otherwise a failure",
            "id": 6173,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "mint",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6169,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6168,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2340:18:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6167,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2340:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2339:20:13"
            },
            "returnParameters": {
              "id": 6172,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6171,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6173,
                  "src": "2378:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6170,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2378:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2377:6:13"
            },
            "scope": 6390,
            "src": "2326:58:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender supplies assets into the market and receives rTokens in exchange\n        Also setting the a selected hat for the account.\n@param hatID The id of the selected Hat\n@return bool true=success, otherwise a failure",
            "id": 6182,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "mintWithSelectedHat",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6178,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6175,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6182,
                  "src": "2687:18:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6174,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2687:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6177,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6182,
                  "src": "2707:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6176,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "2707:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2686:35:13"
            },
            "returnParameters": {
              "id": 6181,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6180,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6182,
                  "src": "2756:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6179,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "2756:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "2755:6:13"
            },
            "scope": 6390,
            "src": "2658:104:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender supplies assets into the market and receives rTokens in exchange\n        Also setting the a new hat for the account.\n@param mintAmount The amount of the underlying asset to supply\n@param proportions Relative proportions of benefits received by the recipients\n@return bool true=success, otherwise a failure",
            "id": 6195,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "mintWithNewHat",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6191,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6184,
                  "name": "mintAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "3173:18:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6183,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "3173:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6187,
                  "name": "recipients",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "3201:29:13",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6185,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "3201:7:13",
                      "stateMutability": "nonpayable",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 6186,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "3201:9:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6190,
                  "name": "proportions",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "3240:29:13",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint32_$dyn_calldata_ptr",
                    "typeString": "uint32[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6188,
                      "name": "uint32",
                      "nodeType": "ElementaryTypeName",
                      "src": "3240:6:13",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "id": 6189,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "3240:8:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr",
                      "typeString": "uint32[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3163:112:13"
            },
            "returnParameters": {
              "id": 6194,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6193,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6195,
                  "src": "3294:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6192,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3294:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3293:6:13"
            },
            "scope": 6390,
            "src": "3140:160:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Moves all tokens from the caller's account to `dst`.\n@param dst The destination address.\n@return bool true=success, otherwise a failure",
            "id": 6202,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "transferAll",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6198,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6197,
                  "name": "dst",
                  "nodeType": "VariableDeclaration",
                  "scope": 6202,
                  "src": "3508:11:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6196,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3508:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3507:13:13"
            },
            "returnParameters": {
              "id": 6201,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6200,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6202,
                  "src": "3539:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6199,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3539:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3538:6:13"
            },
            "scope": 6390,
            "src": "3487:58:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Moves all tokens from `src` account to `dst`.\n@param src The source address which approved the msg.sender to spend\n@param dst The destination address.\n@return bool true=success, otherwise a failure",
            "id": 6211,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "transferAllFrom",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6207,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6204,
                  "name": "src",
                  "nodeType": "VariableDeclaration",
                  "scope": 6211,
                  "src": "3826:11:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6203,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3826:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6206,
                  "name": "dst",
                  "nodeType": "VariableDeclaration",
                  "scope": 6211,
                  "src": "3839:11:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6205,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "3839:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3825:26:13"
            },
            "returnParameters": {
              "id": 6210,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6209,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6211,
                  "src": "3870:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6208,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "3870:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "3869:6:13"
            },
            "scope": 6390,
            "src": "3801:75:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender redeems rTokens in exchange for the underlying asset\n@param redeemTokens The number of rTokens to redeem into underlying\n@return bool true=success, otherwise a failure",
            "id": 6218,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeem",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6214,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6213,
                  "name": "redeemTokens",
                  "nodeType": "VariableDeclaration",
                  "scope": 6218,
                  "src": "4118:20:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6212,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4118:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4117:22:13"
            },
            "returnParameters": {
              "id": 6217,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6216,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6218,
                  "src": "4158:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6215,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4158:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4157:6:13"
            },
            "scope": 6390,
            "src": "4102:62:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender redeems all rTokens in exchange for the underlying asset\n@return bool true=success, otherwise a failure",
            "id": 6223,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeemAll",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6219,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "4337:2:13"
            },
            "returnParameters": {
              "id": 6222,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6221,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6223,
                  "src": "4358:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6220,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4358:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4357:6:13"
            },
            "scope": 6390,
            "src": "4319:45:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender redeems rTokens in exchange for the underlying asset then immediately transfer them to a differen user\n@param redeemTo Destination address to send the redeemed tokens to\n@param redeemTokens The number of rTokens to redeem into underlying\n@return bool true=success, otherwise a failure",
            "id": 6232,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeemAndTransfer",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6228,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6225,
                  "name": "redeemTo",
                  "nodeType": "VariableDeclaration",
                  "scope": 6232,
                  "src": "4741:16:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6224,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "4741:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6227,
                  "name": "redeemTokens",
                  "nodeType": "VariableDeclaration",
                  "scope": 6232,
                  "src": "4759:20:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6226,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "4759:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4740:40:13"
            },
            "returnParameters": {
              "id": 6231,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6230,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6232,
                  "src": "4815:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6229,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "4815:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "4814:6:13"
            },
            "scope": 6390,
            "src": "4714:107:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Sender redeems all rTokens in exchange for the underlying asset then immediately transfer them to a differen user\n@param redeemTo Destination address to send the redeemed tokens to\n@return bool true=success, otherwise a failure",
            "id": 6239,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "redeemAndTransferAll",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6235,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6234,
                  "name": "redeemTo",
                  "nodeType": "VariableDeclaration",
                  "scope": 6239,
                  "src": "5130:16:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6233,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "5130:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5129:18:13"
            },
            "returnParameters": {
              "id": 6238,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6237,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6239,
                  "src": "5166:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6236,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5166:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5165:6:13"
            },
            "scope": 6390,
            "src": "5100:72:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Create a new Hat\n@param recipients List of beneficial recipients\n@param proportions Relative proportions of benefits received by the recipients\n@param doChangeHat Should the hat of the `msg.sender` be switched to the new one\n@return uint256 ID of the newly creatd Hat.",
            "id": 6252,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "createHat",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6248,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6242,
                  "name": "recipients",
                  "nodeType": "VariableDeclaration",
                  "scope": 6252,
                  "src": "5534:29:13",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_calldata_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6240,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "5534:7:13",
                      "stateMutability": "nonpayable",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 6241,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "5534:9:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6245,
                  "name": "proportions",
                  "nodeType": "VariableDeclaration",
                  "scope": 6252,
                  "src": "5573:29:13",
                  "stateVariable": false,
                  "storageLocation": "calldata",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint32_$dyn_calldata_ptr",
                    "typeString": "uint32[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6243,
                      "name": "uint32",
                      "nodeType": "ElementaryTypeName",
                      "src": "5573:6:13",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "id": 6244,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "5573:8:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr",
                      "typeString": "uint32[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6247,
                  "name": "doChangeHat",
                  "nodeType": "VariableDeclaration",
                  "scope": 6252,
                  "src": "5612:16:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6246,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5612:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5524:110:13"
            },
            "returnParameters": {
              "id": 6251,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6250,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6252,
                  "src": "5653:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6249,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5653:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5652:15:13"
            },
            "scope": 6390,
            "src": "5506:162:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Change the hat for `msg.sender`\n@param hatID The id of the Hat\n@return bool true=success, otherwise a failure",
            "id": 6259,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "changeHat",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6255,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6254,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6259,
                  "src": "5848:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6253,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "5848:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5847:15:13"
            },
            "returnParameters": {
              "id": 6258,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6257,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6259,
                  "src": "5881:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6256,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "5881:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "5880:6:13"
            },
            "scope": 6390,
            "src": "5829:58:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice pay interest to the owner\n@param owner Account owner address\n@return bool true=success, otherwise a failure\n     * Anyone can trigger the interest distribution on behalf of the recipient,\ndue to the fact that the recipient can be a contract code that has not\nimplemented the interaction with the rToken contract internally`.\n     * A interest lock-up period may apply, in order to mitigate the \"hat\ninheritance scam\".",
            "id": 6266,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "payInterest",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6262,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6261,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6266,
                  "src": "6412:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6260,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "6412:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6411:15:13"
            },
            "returnParameters": {
              "id": 6265,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6264,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6266,
                  "src": "6445:4:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6263,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "6445:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6444:6:13"
            },
            "scope": 6390,
            "src": "6391:60:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the maximum hatID in the system",
            "id": 6271,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getMaximumHatID",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6267,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "6738:2:13"
            },
            "returnParameters": {
              "id": 6270,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6269,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6271,
                  "src": "6764:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6268,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "6764:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "6763:15:13"
            },
            "scope": 6390,
            "src": "6714:65:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the hatID of the owner and the hat structure\n@param owner Account owner address\n@return hatID Hat ID\n@return recipients Hat recipients\n@return proportions Hat recipient's relative proportions",
            "id": 6284,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getHatByAddress",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6274,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6273,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6284,
                  "src": "7065:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6272,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7065:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7064:15:13"
            },
            "returnParameters": {
              "id": 6283,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6276,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6284,
                  "src": "7140:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6275,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7140:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6279,
                  "name": "recipients",
                  "nodeType": "VariableDeclaration",
                  "scope": 6284,
                  "src": "7167:27:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6277,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "7167:7:13",
                      "stateMutability": "nonpayable",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 6278,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "7167:9:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6282,
                  "name": "proportions",
                  "nodeType": "VariableDeclaration",
                  "scope": 6284,
                  "src": "7208:27:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr",
                    "typeString": "uint32[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6280,
                      "name": "uint32",
                      "nodeType": "ElementaryTypeName",
                      "src": "7208:6:13",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "id": 6281,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "7208:8:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr",
                      "typeString": "uint32[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7126:119:13"
            },
            "scope": 6390,
            "src": "7040:206:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the hat structure\n@param hatID Hat ID\n@return recipients Hat recipients\n@return proportions Hat recipient's relative proportions",
            "id": 6295,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getHatByID",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6287,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6286,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6295,
                  "src": "7457:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6285,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7457:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7456:15:13"
            },
            "returnParameters": {
              "id": 6294,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6290,
                  "name": "recipients",
                  "nodeType": "VariableDeclaration",
                  "scope": 6295,
                  "src": "7519:27:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr",
                    "typeString": "address[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6288,
                      "name": "address",
                      "nodeType": "ElementaryTypeName",
                      "src": "7519:7:13",
                      "stateMutability": "nonpayable",
                      "typeDescriptions": {
                        "typeIdentifier": "t_address",
                        "typeString": "address"
                      }
                    },
                    "id": 6289,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "7519:9:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr",
                      "typeString": "address[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6293,
                  "name": "proportions",
                  "nodeType": "VariableDeclaration",
                  "scope": 6295,
                  "src": "7548:27:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_array$_t_uint32_$dyn_memory_ptr",
                    "typeString": "uint32[]"
                  },
                  "typeName": {
                    "baseType": {
                      "id": 6291,
                      "name": "uint32",
                      "nodeType": "ElementaryTypeName",
                      "src": "7548:6:13",
                      "typeDescriptions": {
                        "typeIdentifier": "t_uint32",
                        "typeString": "uint32"
                      }
                    },
                    "id": 6292,
                    "length": null,
                    "nodeType": "ArrayTypeName",
                    "src": "7548:8:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_array$_t_uint32_$dyn_storage_ptr",
                      "typeString": "uint32[]"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7518:58:13"
            },
            "scope": 6390,
            "src": "7437:140:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Amount of saving assets given to the recipient along with the\n        loans.\n@param owner Account owner address",
            "id": 6302,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "receivedSavingsOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6298,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6297,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6302,
                  "src": "7767:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6296,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "7767:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7766:15:13"
            },
            "returnParameters": {
              "id": 6301,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6300,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6302,
                  "src": "7829:14:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6299,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "7829:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "7828:16:13"
            },
            "scope": 6390,
            "src": "7740:105:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Amount of token loaned to the recipient along with the savings\n        assets.\n@param owner Account owner address\n@return amount",
            "id": 6309,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "receivedLoanOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6305,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6304,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6309,
                  "src": "8056:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6303,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8056:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8055:15:13"
            },
            "returnParameters": {
              "id": 6308,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6307,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6309,
                  "src": "8118:14:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6306,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8118:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8117:16:13"
            },
            "scope": 6390,
            "src": "8032:102:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the current interest balance of the owner.\nIt is equivalent of: receivedSavings - receivedLoan - freeBalance\n@param owner Account owner address\n@return amount",
            "id": 6316,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "interestPayableOf",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6312,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6311,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6316,
                  "src": "8390:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6310,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "8390:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8389:15:13"
            },
            "returnParameters": {
              "id": 6315,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6314,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6316,
                  "src": "8452:14:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6313,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "8452:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8451:16:13"
            },
            "scope": 6390,
            "src": "8363:105:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get current saving strategy",
            "id": 6321,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "ias",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6317,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "8530:2:13"
            },
            "returnParameters": {
              "id": 6320,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6319,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6321,
                  "src": "8551:19:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_contract$_IAllocationStrategy_$6133",
                    "typeString": "contract IAllocationStrategy"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6318,
                    "name": "IAllocationStrategy",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 6133,
                    "src": "8551:19:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_contract$_IAllocationStrategy_$6133",
                      "typeString": "contract IAllocationStrategy"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "8550:21:13"
            },
            "scope": 6390,
            "src": "8518:54:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Saving asset original to internal amount conversion rate.\n\n    /// @dev About the saving asset original to internal conversaioon rate:\n\n    ///      - It has 18 decimals\n      - It starts with value 1\n      - Each strategy switching results a new conversion rate\n\n    /// NOTE:\n\n    /// 1. The reason there is an exchange rate is that, each time the\n    allocation strategy is switched, the unit of the original amount gets\n    changed, it is impossible to change all the internal savings\n    accounting entries for all accounts, hence instead a conversaion rate\n    is used to simplify the process.\n 2. internalSavings == originalSavings * savingAssetConversionRate",
            "id": 6326,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "savingAssetConversionRate",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6322,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "9372:2:13"
            },
            "returnParameters": {
              "id": 6325,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6324,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6326,
                  "src": "9393:7:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6323,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "9393:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9392:9:13"
            },
            "scope": 6390,
            "src": "9338:64:13",
            "stateMutability": "nonpayable",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get the current saving strategy contract\n@return Saving strategy address",
            "id": 6331,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getCurrentSavingStrategy",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6327,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "9738:2:13"
            },
            "returnParameters": {
              "id": 6330,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6329,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6331,
                  "src": "9764:7:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6328,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "9764:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "9763:9:13"
            },
            "scope": 6390,
            "src": "9705:68:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get saving asset balance for specific saving strategy\n@return rAmount Balance in redeemable amount\n@return sOriginalAmount Balance in native amount of the strategy",
            "id": 6338,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getSavingAssetBalance",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6332,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10014:2:13"
            },
            "returnParameters": {
              "id": 6337,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6334,
                  "name": "rAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6338,
                  "src": "10064:15:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6333,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10064:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6336,
                  "name": "sOriginalAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6338,
                  "src": "10081:23:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6335,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10081:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10063:42:13"
            },
            "scope": 6390,
            "src": "9984:122:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get global stats\n@return global stats",
            "id": 6343,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getGlobalStats",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6339,
              "nodeType": "ParameterList",
              "parameters": [],
              "src": "10208:2:13"
            },
            "returnParameters": {
              "id": 6342,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6341,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6343,
                  "src": "10234:18:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_GlobalStats_$9351_memory_ptr",
                    "typeString": "struct RTokenStructs.GlobalStats"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6340,
                    "name": "GlobalStats",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 9351,
                    "src": "10234:11:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_GlobalStats_$9351_storage_ptr",
                      "typeString": "struct RTokenStructs.GlobalStats"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10233:20:13"
            },
            "scope": 6390,
            "src": "10185:69:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get account stats\n@param owner Account owner address\n@return account stats",
            "id": 6350,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getAccountStats",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6346,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6345,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6350,
                  "src": "10401:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6344,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "10401:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10400:15:13"
            },
            "returnParameters": {
              "id": 6349,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6348,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6350,
                  "src": "10463:23:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_AccountStatsView_$9368_memory_ptr",
                    "typeString": "struct RTokenStructs.AccountStatsView"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6347,
                    "name": "AccountStatsView",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 9368,
                    "src": "10463:16:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_AccountStatsView_$9368_storage_ptr",
                      "typeString": "struct RTokenStructs.AccountStatsView"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10462:25:13"
            },
            "scope": 6390,
            "src": "10376:112:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "body": null,
            "documentation": "@notice Get hat stats\n@param hatID Hat ID\n@return hat stats",
            "id": 6357,
            "implemented": false,
            "kind": "function",
            "modifiers": [],
            "name": "getHatStats",
            "nodeType": "FunctionDefinition",
            "parameters": {
              "id": 6353,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6352,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6357,
                  "src": "10608:13:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6351,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "10608:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10607:15:13"
            },
            "returnParameters": {
              "id": 6356,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6355,
                  "name": "",
                  "nodeType": "VariableDeclaration",
                  "scope": 6357,
                  "src": "10670:19:13",
                  "stateVariable": false,
                  "storageLocation": "memory",
                  "typeDescriptions": {
                    "typeIdentifier": "t_struct$_HatStatsView_$9378_memory_ptr",
                    "typeString": "struct RTokenStructs.HatStatsView"
                  },
                  "typeName": {
                    "contractScope": null,
                    "id": 6354,
                    "name": "HatStatsView",
                    "nodeType": "UserDefinedTypeName",
                    "referencedDeclaration": 9378,
                    "src": "10670:12:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_struct$_HatStatsView_$9378_storage_ptr",
                      "typeString": "struct RTokenStructs.HatStatsView"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10669:21:13"
            },
            "scope": 6390,
            "src": "10587:104:13",
            "stateMutability": "view",
            "superFunction": null,
            "visibility": "external"
          },
          {
            "anonymous": false,
            "documentation": "@notice Event emitted when loans get transferred",
            "id": 6371,
            "name": "LoansTransferred",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 6370,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6359,
                  "indexed": true,
                  "name": "owner",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "10977:21:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6358,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "10977:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6361,
                  "indexed": true,
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11008:25:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6360,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "11008:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6363,
                  "indexed": true,
                  "name": "hatId",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11043:21:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6362,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11043:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6365,
                  "indexed": false,
                  "name": "isDistribution",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11074:19:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_bool",
                    "typeString": "bool"
                  },
                  "typeName": {
                    "id": 6364,
                    "name": "bool",
                    "nodeType": "ElementaryTypeName",
                    "src": "11074:4:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_bool",
                      "typeString": "bool"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6367,
                  "indexed": false,
                  "name": "redeemableAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11103:24:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6366,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11103:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6369,
                  "indexed": false,
                  "name": "internalSavingsAmount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6371,
                  "src": "11137:29:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6368,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11137:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "10967:200:13"
            },
            "src": "10945:223:13"
          },
          {
            "anonymous": false,
            "documentation": "@notice Event emitted when interest paid",
            "id": 6377,
            "name": "InterestPaid",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 6376,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6373,
                  "indexed": true,
                  "name": "recipient",
                  "nodeType": "VariableDeclaration",
                  "scope": 6377,
                  "src": "11257:25:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6372,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "11257:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6375,
                  "indexed": false,
                  "name": "amount",
                  "nodeType": "VariableDeclaration",
                  "scope": 6377,
                  "src": "11284:14:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6374,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11284:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11256:43:13"
            },
            "src": "11238:62:13"
          },
          {
            "anonymous": false,
            "documentation": "@notice A new hat is created",
            "id": 6381,
            "name": "HatCreated",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 6380,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6379,
                  "indexed": true,
                  "name": "hatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6381,
                  "src": "11375:21:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6378,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11375:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11374:23:13"
            },
            "src": "11358:40:13"
          },
          {
            "anonymous": false,
            "documentation": "@notice Hat is changed for the account",
            "id": 6389,
            "name": "HatChanged",
            "nodeType": "EventDefinition",
            "parameters": {
              "id": 6388,
              "nodeType": "ParameterList",
              "parameters": [
                {
                  "constant": false,
                  "id": 6383,
                  "indexed": true,
                  "name": "account",
                  "nodeType": "VariableDeclaration",
                  "scope": 6389,
                  "src": "11483:23:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_address",
                    "typeString": "address"
                  },
                  "typeName": {
                    "id": 6382,
                    "name": "address",
                    "nodeType": "ElementaryTypeName",
                    "src": "11483:7:13",
                    "stateMutability": "nonpayable",
                    "typeDescriptions": {
                      "typeIdentifier": "t_address",
                      "typeString": "address"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6385,
                  "indexed": true,
                  "name": "oldHatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6389,
                  "src": "11508:24:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6384,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11508:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                },
                {
                  "constant": false,
                  "id": 6387,
                  "indexed": true,
                  "name": "newHatID",
                  "nodeType": "VariableDeclaration",
                  "scope": 6389,
                  "src": "11534:24:13",
                  "stateVariable": false,
                  "storageLocation": "default",
                  "typeDescriptions": {
                    "typeIdentifier": "t_uint256",
                    "typeString": "uint256"
                  },
                  "typeName": {
                    "id": 6386,
                    "name": "uint256",
                    "nodeType": "ElementaryTypeName",
                    "src": "11534:7:13",
                    "typeDescriptions": {
                      "typeIdentifier": "t_uint256",
                      "typeString": "uint256"
                    }
                  },
                  "value": null,
                  "visibility": "internal"
                }
              ],
              "src": "11482:77:13"
            },
            "src": "11466:94:13"
          }
        ],
        "scope": 6391,
        "src": "677:10885:13"
      }
    ],
    "src": "202:11361:13"
  },
  "compiler": {
    "name": "solc",
    "version": "0.5.12+commit.7709ece9.Emscripten.clang"
  },
  "networks": {},
  "schemaVersion": "3.0.21",
  "updatedAt": "2020-04-22T17:31:54.530Z",
  "devdoc": {
    "methods": {
      "allowance(address,address)": {
        "details": "Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. This is zero by default.     * This value changes when {approve} or {transferFrom} are called."
      },
      "approve(address,uint256)": {
        "details": "Sets `amount` as the allowance of `spender` over the caller's tokens.     * Returns a boolean value indicating whether the operation succeeded.     * IMPORTANT: Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729     * Emits an {Approval} event."
      },
      "balanceOf(address)": {
        "details": "Returns the amount of tokens owned by `account`."
      },
      "changeHat(uint256)": {
        "params": {
          "hatID": "The id of the Hat"
        },
        "return": "bool true=success, otherwise a failure"
      },
      "createHat(address[],uint32[],bool)": {
        "params": {
          "doChangeHat": "Should the hat of the `msg.sender` be switched to the new one",
          "proportions": "Relative proportions of benefits received by the recipients",
          "recipients": "List of beneficial recipients"
        },
        "return": "uint256 ID of the newly creatd Hat."
      },
      "getAccountStats(address)": {
        "params": {
          "owner": "Account owner address"
        },
        "return": "account stats"
      },
      "getCurrentSavingStrategy()": {
        "return": "Saving strategy address"
      },
      "getGlobalStats()": {
        "return": "global stats"
      },
      "getHatByAddress(address)": {
        "params": {
          "owner": "Account owner address"
        },
        "return": "hatID Hat IDrecipients Hat recipientsproportions Hat recipient's relative proportions"
      },
      "getHatByID(uint256)": {
        "params": {
          "hatID": "Hat ID"
        },
        "return": "recipients Hat recipientsproportions Hat recipient's relative proportions"
      },
      "getHatStats(uint256)": {
        "params": {
          "hatID": "Hat ID"
        },
        "return": "hat stats"
      },
      "getSavingAssetBalance()": {
        "return": "rAmount Balance in redeemable amountsOriginalAmount Balance in native amount of the strategy"
      },
      "interestPayableOf(address)": {
        "params": {
          "owner": "Account owner address"
        },
        "return": "amount"
      },
      "mint(uint256)": {
        "params": {
          "mintAmount": "The amount of the underlying asset to supply"
        },
        "return": "bool true=success, otherwise a failure"
      },
      "mintWithNewHat(uint256,address[],uint32[])": {
        "params": {
          "mintAmount": "The amount of the underlying asset to supply",
          "proportions": "Relative proportions of benefits received by the recipients"
        },
        "return": "bool true=success, otherwise a failure"
      },
      "mintWithSelectedHat(uint256,uint256)": {
        "params": {
          "hatID": "The id of the selected Hat"
        },
        "return": "bool true=success, otherwise a failure"
      },
      "payInterest(address)": {
        "params": {
          "owner": "Account owner address"
        },
        "return": "bool true=success, otherwise a failure     * Anyone can trigger the interest distribution on behalf of the recipient, due to the fact that the recipient can be a contract code that has not implemented the interaction with the rToken contract internally`.     * A interest lock-up period may apply, in order to mitigate the \"hat inheritance scam\"."
      },
      "receivedLoanOf(address)": {
        "params": {
          "owner": "Account owner address"
        },
        "return": "amount"
      },
      "receivedSavingsOf(address)": {
        "params": {
          "owner": "Account owner address"
        }
      },
      "redeem(uint256)": {
        "params": {
          "redeemTokens": "The number of rTokens to redeem into underlying"
        },
        "return": "bool true=success, otherwise a failure"
      },
      "redeemAll()": {
        "return": "bool true=success, otherwise a failure"
      },
      "redeemAndTransfer(address,uint256)": {
        "params": {
          "redeemTo": "Destination address to send the redeemed tokens to",
          "redeemTokens": "The number of rTokens to redeem into underlying"
        },
        "return": "bool true=success, otherwise a failure"
      },
      "redeemAndTransferAll(address)": {
        "params": {
          "redeemTo": "Destination address to send the redeemed tokens to"
        },
        "return": "bool true=success, otherwise a failure"
      },
      "savingAssetConversionRate()": {
        "details": "About the saving asset original to internal conversaioon rate:     ///      - It has 18 decimals      - It starts with value 1      - Each strategy switching results a new conversion rate     /// NOTE:     /// 1. The reason there is an exchange rate is that, each time the    allocation strategy is switched, the unit of the original amount gets    changed, it is impossible to change all the internal savings    accounting entries for all accounts, hence instead a conversaion rate    is used to simplify the process. 2. internalSavings == originalSavings * savingAssetConversionRate"
      },
      "totalSupply()": {
        "details": "Returns the amount of tokens in existence."
      },
      "transfer(address,uint256)": {
        "details": "Moves `amount` tokens from the caller's account to `recipient`.     * Returns a boolean value indicating whether the operation succeeded.     * Emits a {Transfer} event."
      },
      "transferAll(address)": {
        "params": {
          "dst": "The destination address."
        },
        "return": "bool true=success, otherwise a failure"
      },
      "transferAllFrom(address,address)": {
        "params": {
          "dst": "The destination address.",
          "src": "The source address which approved the msg.sender to spend"
        },
        "return": "bool true=success, otherwise a failure"
      },
      "transferFrom(address,address,uint256)": {
        "details": "Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance.     * Returns a boolean value indicating whether the operation succeeded.     * Emits a {Transfer} event."
      }
    }
  },
  "userdoc": {
    "methods": {
      "changeHat(uint256)": {
        "notice": "Change the hat for `msg.sender`"
      },
      "createHat(address[],uint32[],bool)": {
        "notice": "Create a new Hat"
      },
      "decimals()": {
        "notice": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5,05` (`505 / 10 ** 2`).     * Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei.     * NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."
      },
      "getAccountStats(address)": {
        "notice": "Get account stats"
      },
      "getCurrentSavingStrategy()": {
        "notice": "Get the current saving strategy contract"
      },
      "getGlobalStats()": {
        "notice": "Get global stats"
      },
      "getHatByAddress(address)": {
        "notice": "Get the hatID of the owner and the hat structure"
      },
      "getHatByID(uint256)": {
        "notice": "Get the hat structure"
      },
      "getHatStats(uint256)": {
        "notice": "Get hat stats"
      },
      "getMaximumHatID()": {
        "notice": "Get the maximum hatID in the system"
      },
      "getSavingAssetBalance()": {
        "notice": "Get saving asset balance for specific saving strategy"
      },
      "ias()": {
        "notice": "Get current saving strategy"
      },
      "interestPayableOf(address)": {
        "notice": "Get the current interest balance of the owner. It is equivalent of: receivedSavings - receivedLoan - freeBalance"
      },
      "mint(uint256)": {
        "notice": "Sender supplies assets into the market and receives rTokens in exchange"
      },
      "mintWithNewHat(uint256,address[],uint32[])": {
        "notice": "Sender supplies assets into the market and receives rTokens in exchange        Also setting the a new hat for the account."
      },
      "mintWithSelectedHat(uint256,uint256)": {
        "notice": "Sender supplies assets into the market and receives rTokens in exchange        Also setting the a selected hat for the account."
      },
      "name()": {
        "notice": "Returns the name of the token."
      },
      "payInterest(address)": {
        "notice": "pay interest to the owner"
      },
      "receivedLoanOf(address)": {
        "notice": "Amount of token loaned to the recipient along with the savings        assets."
      },
      "receivedSavingsOf(address)": {
        "notice": "Amount of saving assets given to the recipient along with the        loans."
      },
      "redeem(uint256)": {
        "notice": "Sender redeems rTokens in exchange for the underlying asset"
      },
      "redeemAll()": {
        "notice": "Sender redeems all rTokens in exchange for the underlying asset"
      },
      "redeemAndTransfer(address,uint256)": {
        "notice": "Sender redeems rTokens in exchange for the underlying asset then immediately transfer them to a differen user"
      },
      "redeemAndTransferAll(address)": {
        "notice": "Sender redeems all rTokens in exchange for the underlying asset then immediately transfer them to a differen user"
      },
      "savingAssetConversionRate()": {
        "notice": "Saving asset original to internal amount conversion rate. "
      },
      "symbol()": {
        "notice": "Returns the symbol of the token, usually a shorter version of the name."
      },
      "token()": {
        "notice": "/////////////////////////////////////////////////////////////////////////Returning the underlying token"
      },
      "transferAll(address)": {
        "notice": "Moves all tokens from the caller's account to `dst`."
      },
      "transferAllFrom(address,address)": {
        "notice": "Moves all tokens from `src` account to `dst`."
      }
    },
    "notice": "RToken interface a ERC20 interface and one can mint new tokens by     trasfering underlying token into the contract, configure _hats_ for     addresses and pay earned interest in new _rTokens_."
  }
}