UNPKG

@kollateral/kollateral-contracts

Version:

1,330 lines (1,329 loc) 139 kB
{ "contractName": "IKToken", "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": false, "internalType": "address", "name": "minter", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "kTokenAmount", "type": "uint256" } ], "name": "Mint", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "redeemer", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "kTokenAmount", "type": "uint256" } ], "name": "Redeem", "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": "uint256", "name": "kTokenAmount", "type": "uint256" } ], "name": "redeem", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" } ], "name": "redeemUnderlying", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "transferUnderlying", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "lock", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [], "name": "unlock", "outputs": [], "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": true, "inputs": [ { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" }, { "internalType": "bool", "name": "ceiling", "type": "bool" } ], "name": "tokenAmountToKTokenAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "uint256", "name": "kTokenAmount", "type": "uint256" } ], "name": "kTokenAmountToTokenAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "isKEther", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalReserve", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "internalType": "address", "name": "owner", "type": "address" } ], "name": "balanceOfUnderlying", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "tokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "invokerAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "invokerAddress", "type": "address" } ], "name": "setInvokerAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"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\":false,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kTokenAmount\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"redeemer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"kTokenAmount\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"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\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOfUnderlying\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"invokerAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"isKEther\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"kTokenAmount\",\"type\":\"uint256\"}],\"name\":\"kTokenAmountToTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"lock\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"kTokenAmount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"redeemUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"invokerAddress\",\"type\":\"address\"}],\"name\":\"setInvokerAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"tokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"ceiling\",\"type\":\"bool\"}],\"name\":\"tokenAmountToKTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalReserve\",\"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\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferUnderlying\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"unlock\",\"outputs\":[],\"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`.\"},\"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.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IKToken.sol\":\"IKToken\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IKToken.sol\":{\"keccak256\":\"0x5b03d279a41856eef739da4ee50155425bbd95d99d80e4b910ec5abb91a99e40\",\"urls\":[\"bzz-raw://4ef7259b5604ef20e62b2503bc34d4052f99b85a18a80b072b8883bb7f9559de\",\"dweb:/ipfs/QmUsVQH9M3FoB4rpJGZJpZrbk2kcDFyRg5E5WfAKqHYkok\"]},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe5bb0f57cff3e299f360052ba50f1ea0fff046df2be070b6943e0e3c3fdad8a9\",\"urls\":[\"bzz-raw://59fd025151435da35faa8093a5c7a17de02de9d08ad27275c5cdf05050820d91\",\"dweb:/ipfs/QmQMvwEcPhoRXzbXyrdoeRtvLoifUW9Qh7Luho7bmUPRkc\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity ^0.5.0;\n\nimport \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\ncontract IKToken is IERC20 {\n\n event Mint(address minter, uint256 tokenAmount, uint256 kTokenAmount);\n event Redeem(address redeemer, uint256 tokenAmount, uint256 kTokenAmount);\n\n /*\n * PUBLIC STATE CHANGING\n */\n\n function redeem(uint256 kTokenAmount)\n external\n returns (bool);\n\n function redeemUnderlying(uint256 tokenAmount)\n external\n returns (bool);\n\n function mintInternal(uint256 amount)\n internal\n returns (bool);\n\n function redeemInternal(uint256 tokenAmount, uint256 kTokenAmount)\n internal\n returns (bool);\n\n /*\n * INVOKER STATE-CHANGING HOOKS\n */\n\n function transferUnderlying(address to, uint256 amount)\n external\n returns (bool);\n\n function transferUnderlyingInternal(address to, uint256 amount) internal returns (bool);\n\n /* Lock automatically clears after block in case of any unintended locking attacks */\n function lock()\n external;\n\n function unlock()\n external;\n\n /* Adds unlimited allowance functionality to standard transferFrom implementation */\n function transferFrom(address sender, address recipient, uint256 amount) public returns (bool);\n\n /*\n * VIEWS\n */\n\n function tokenAmountToKTokenAmount(uint256 tokenAmount, bool ceiling) public view returns (uint256);\n\n function tokenAmountToKTokenAmountInternal(uint256 tokenAmount, bool ceiling, bool alreadyDeposited)\n internal\n view\n returns (uint256);\n\n function kTokenAmountToTokenAmount(uint256 kTokenAmount) public view returns (uint256);\n\n function isKEther() public view returns (bool);\n\n function totalReserve() public view returns (uint256);\n\n function balanceOfUnderlying(address owner) public view returns (uint256);\n\n function tokenAddress() external view returns (address);\n\n function invokerAddress() external view returns (address);\n\n /*\n * ADMIN FUNCTIONS\n */\n\n /* KToken ownership will be relinquished before public launch. */\n function setInvokerAddress(address invokerAddress) external;\n}\n", "sourcePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IKToken.sol", "ast": { "absolutePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IKToken.sol", "exportedSymbols": { "IKToken": [ 2074 ] }, "id": 2075, "nodeType": "SourceUnit", "nodes": [ { "id": 1930, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:9" }, { "absolutePath": "@openzeppelin/contracts/token/ERC20/IERC20.sol", "file": "@openzeppelin/contracts/token/ERC20/IERC20.sol", "id": 1931, "nodeType": "ImportDirective", "scope": 2075, "sourceUnit": 3550, "src": "25:56:9", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 1932, "name": "IERC20", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 3549, "src": "103:6:9", "typeDescriptions": { "typeIdentifier": "t_contract$_IERC20_$3549", "typeString": "contract IERC20" } }, "id": 1933, "nodeType": "InheritanceSpecifier", "src": "103:6:9" } ], "contractDependencies": [ 3549 ], "contractKind": "contract", "documentation": null, "fullyImplemented": false, "id": 2074, "linearizedBaseContracts": [ 2074, 3549 ], "name": "IKToken", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 1941, "name": "Mint", "nodeType": "EventDefinition", "parameters": { "id": 1940, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1935, "indexed": false, "name": "minter", "nodeType": "VariableDeclaration", "scope": 1941, "src": "128:14:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1934, "name": "address", "nodeType": "ElementaryTypeName", "src": "128:7:9", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1937, "indexed": false, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1941, "src": "144:19:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1936, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "144:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1939, "indexed": false, "name": "kTokenAmount", "nodeType": "VariableDeclaration", "scope": 1941, "src": "165:20:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1938, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "165:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "127:59:9" }, "src": "117:70:9" }, { "anonymous": false, "documentation": null, "id": 1949, "name": "Redeem", "nodeType": "EventDefinition", "parameters": { "id": 1948, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1943, "indexed": false, "name": "redeemer", "nodeType": "VariableDeclaration", "scope": 1949, "src": "205:16:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1942, "name": "address", "nodeType": "ElementaryTypeName", "src": "205:7:9", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1945, "indexed": false, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1949, "src": "223:19:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1944, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "223:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1947, "indexed": false, "name": "kTokenAmount", "nodeType": "VariableDeclaration", "scope": 1949, "src": "244:20:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1946, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "244:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "204:61:9" }, "src": "192:74:9" }, { "body": null, "documentation": null, "id": 1956, "implemented": false, "kind": "function", "modifiers": [], "name": "redeem", "nodeType": "FunctionDefinition", "parameters": { "id": 1952, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1951, "name": "kTokenAmount", "nodeType": "VariableDeclaration", "scope": 1956, "src": "333:20:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1950, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "333:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "332:22:9" }, "returnParameters": { "id": 1955, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1954, "name": "", "nodeType": "VariableDeclaration", "scope": 1956, "src": "381:4:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1953, "name": "bool", "nodeType": "ElementaryTypeName", "src": "381:4:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "380:6:9" }, "scope": 2074, "src": "317:70:9", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1963, "implemented": false, "kind": "function", "modifiers": [], "name": "redeemUnderlying", "nodeType": "FunctionDefinition", "parameters": { "id": 1959, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1958, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1963, "src": "419:19:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1957, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "419:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "418:21:9" }, "returnParameters": { "id": 1962, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1961, "name": "", "nodeType": "VariableDeclaration", "scope": 1963, "src": "466:4:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1960, "name": "bool", "nodeType": "ElementaryTypeName", "src": "466:4:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "465:6:9" }, "scope": 2074, "src": "393:79:9", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1970, "implemented": false, "kind": "function", "modifiers": [], "name": "mintInternal", "nodeType": "FunctionDefinition", "parameters": { "id": 1966, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1965, "name": "amount", "nodeType": "VariableDeclaration", "scope": 1970, "src": "500:14:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1964, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "500:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "499:16:9" }, "returnParameters": { "id": 1969, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1968, "name": "", "nodeType": "VariableDeclaration", "scope": 1970, "src": "542:4:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1967, "name": "bool", "nodeType": "ElementaryTypeName", "src": "542:4:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "541:6:9" }, "scope": 2074, "src": "478:70:9", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": null, "id": 1979, "implemented": false, "kind": "function", "modifiers": [], "name": "redeemInternal", "nodeType": "FunctionDefinition", "parameters": { "id": 1975, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1972, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1979, "src": "578:19:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1971, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "578:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1974, "name": "kTokenAmount", "nodeType": "VariableDeclaration", "scope": 1979, "src": "599:20:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1973, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "599:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "577:43:9" }, "returnParameters": { "id": 1978, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1977, "name": "", "nodeType": "VariableDeclaration", "scope": 1979, "src": "647:4:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1976, "name": "bool", "nodeType": "ElementaryTypeName", "src": "647:4:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "646:6:9" }, "scope": 2074, "src": "554:99:9", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": null, "id": 1988, "implemented": false, "kind": "function", "modifiers": [], "name": "transferUnderlying", "nodeType": "FunctionDefinition", "parameters": { "id": 1984, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1981, "name": "to", "nodeType": "VariableDeclaration", "scope": 1988, "src": "738:10:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1980, "name": "address", "nodeType": "ElementaryTypeName", "src": "738:7:9", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1983, "name": "amount", "nodeType": "VariableDeclaration", "scope": 1988, "src": "750:14:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1982, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "750:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "737:28:9" }, "returnParameters": { "id": 1987, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1986, "name": "", "nodeType": "VariableDeclaration", "scope": 1988, "src": "792:4:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1985, "name": "bool", "nodeType": "ElementaryTypeName", "src": "792:4:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "791:6:9" }, "scope": 2074, "src": "710:88:9", "stateMutability": "nonpayable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1997, "implemented": false, "kind": "function", "modifiers": [], "name": "transferUnderlyingInternal", "nodeType": "FunctionDefinition", "parameters": { "id": 1993, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1990, "name": "to", "nodeType": "VariableDeclaration", "scope": 1997, "src": "840:10:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1989, "name": "address", "nodeType": "ElementaryTypeName", "src": "840:7:9", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1992, "name": "amount", "nodeType": "VariableDeclaration", "scope": 1997, "src": "852:14:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1991, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "852:7:9", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "839:28:9" }, "returnParameters": { "id": 1996, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1995, "name": "", "nodeType": "VariableDeclaration", "scope": 1997, "src": "886:4:9", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" }, "typeName": { "id": 1994, "name": "bool", "nodeType": "ElementaryTypeName", "src": "886:4:9", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "value": null, "visibility": "internal" } ], "src": "885:6:9" }, "scope": 2074, "src": "804:88:9", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": null, "id": 2000, "implemented": false, "kind": "function", "modifiers": [], "name": "lock", "nodeType": "FunctionDefinition", "parameters": { "id": 1998, "nodeType": "ParameterList", "parameters": [], "src": "1001:2:9" }, "returnParameters": { "id": 1999,