UNPKG

@kollateral/kollateral-contracts

Version:

1,317 lines (1,316 loc) 99 kB
{ "contractName": "IInvoker", "abi": [ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "invokeAddress", "type": "address" }, { "indexed": false, "internalType": "bytes32", "name": "invokeDataHash", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "kTokenAddress", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenAmount", "type": "uint256" } ], "name": "Invocation", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "poolReward", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "platformReward", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "tokenAddress", "type": "address" } ], "name": "Reward", "type": "event" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "invokeAddress", "type": "address" }, { "internalType": "bytes", "name": "invokeData", "type": "bytes" }, { "internalType": "address", "name": "kTokenAddress", "type": "address" }, { "internalType": "uint256", "name": "tokenAmount", "type": "uint256" } ], "name": "invoke", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": true, "inputs": [], "name": "poolReward", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "platformReward", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "currentTokenAmount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "currentExpectedBalance", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "currentKTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "currentTokenAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "kTokenAddress", "type": "address" } ], "name": "registerKToken", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "poolRewardBips", "type": "uint256" } ], "name": "setPoolReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "uint256", "name": "platformRewardBips", "type": "uint256" } ], "name": "setPlatformReward", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ { "internalType": "address", "name": "platformVaultAddress", "type": "address" } ], "name": "setPlatformVaultAddress", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "metadata": "{\"compiler\":{\"version\":\"0.5.16+commit.9c3226ce\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"invokeAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"invokeDataHash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"kTokenAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"Invocation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"poolReward\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"platformReward\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"tokenAddress\",\"type\":\"address\"}],\"name\":\"Reward\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentExpectedBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentKTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentTokenAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"currentTokenAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"invokeAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"invokeData\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"kTokenAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenAmount\",\"type\":\"uint256\"}],\"name\":\"invoke\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"platformReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"poolReward\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"kTokenAddress\",\"type\":\"address\"}],\"name\":\"registerKToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"platformRewardBips\",\"type\":\"uint256\"}],\"name\":\"setPlatformReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"platformVaultAddress\",\"type\":\"address\"}],\"name\":\"setPlatformVaultAddress\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"poolRewardBips\",\"type\":\"uint256\"}],\"name\":\"setPoolReward\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IInvoker.sol\":\"IInvoker\"},\"evmVersion\":\"istanbul\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IInvoker.sol\":{\"keccak256\":\"0x8ad397e0611b31884a19bed7b27712530efb95ecf032fc8b8e0c25f4d3190569\",\"urls\":[\"bzz-raw://b23aa7fa654935abb0286ceac8eaf281589b866b75f0cc5b2d8971e1378e98c1\",\"dweb:/ipfs/QmVqYaxBEQVGfXUXVSFXaG6ZfFz5dEwkjDoMprZqbLAnyN\"]},\"@openzeppelin/contracts/GSN/Context.sol\":{\"keccak256\":\"0x90a3995645af7562d84b9d69363ffa5ae7217714ab61e951bf7bc450f40e4061\",\"urls\":[\"bzz-raw://216ef9d6b614db4eb46970b4e84903f2534a45572dd30a79f0041f1a5830f436\",\"dweb:/ipfs/QmNPrJ4MWKUAWzKXpUqeyKRUfosaoANZAqXgvepdrCwZAG\"]},\"@openzeppelin/contracts/access/Roles.sol\":{\"keccak256\":\"0xb002c378d7b82a101bd659c341518953ca0919d342c0a400196982c0e7e7bcdb\",\"urls\":[\"bzz-raw://00a788c4631466c220b385bdd100c571d24b2deccd657615cfbcef6cadf669a4\",\"dweb:/ipfs/QmTEwDbjJNxmMNCDMqtuou3dyM8Wtp8Q9NFvn7SAVM7Jf3\"]},\"@openzeppelin/contracts/access/roles/PauserRole.sol\":{\"keccak256\":\"0xd1b5c934bab36d753c22987ad98c7614cb50ebf641371a83c96f8138619d7c30\",\"urls\":[\"bzz-raw://69c4bb822caae3d1bfd38e81f03b6d618d4d83cbb8e9f8236d28e1c4fe1d0d81\",\"dweb:/ipfs/QmWamstbFhdySmocF2TSKYVLLZF24JG4aXMvHiRdWKv3RA\"]},\"@openzeppelin/contracts/lifecycle/Pausable.sol\":{\"keccak256\":\"0xd3e5a49edfb74654d122962cc60b917d1c60461e669a7262fd7aba201fac1260\",\"urls\":[\"bzz-raw://0307a3cae4df037aee16fb0b0d94849cb4d9b20d7d7182c185f3efac6d2caec0\",\"dweb:/ipfs/QmezTANBfrJmCvxfmfyfcfFGtbcUEUtoJCjfxKnAePiNoE\"]},\"@openzeppelin/contracts/math/SafeMath.sol\":{\"keccak256\":\"0x640b6dee7a4b830bdfd52b5031a07fc2b12209f5b2e29e5d364a7d37f69d8076\",\"urls\":[\"bzz-raw://31113152e1ddb78fe7a4197f247591ca894e93f916867beb708d8e747b6cc74f\",\"dweb:/ipfs/QmbZaJyXdpsYGykVhHH9qpVGQg9DGCxE2QufbCUy3daTgq\"]},\"@openzeppelin/contracts/ownership/Ownable.sol\":{\"keccak256\":\"0xecd8ab29d9a5771c3964d0cd1788c4a5098a0081b20fb275da850a22b1c59806\",\"urls\":[\"bzz-raw://696a75bc2c55407ce8251ccc7d19ecb1b7b2be1796a160a6524312babcc7e3d4\",\"dweb:/ipfs/QmQViKEp3y99h9uhRssE29TmjBKRnFMaoz3eJZ4eggggg2\"]},\"@openzeppelin/contracts/utils/ReentrancyGuard.sol\":{\"keccak256\":\"0xe86fdc15fbc379ecf14d6aa4f51b87c0be8476e114e23c171b790a6717230655\",\"urls\":[\"bzz-raw://81905037f66d37ed211a4e3430af74f36e18b3a5d5b688e6d7d5ee199824a41a\",\"dweb:/ipfs/QmTcpgNKqLVRbcgNSUHazAbVf2bz5uh5mPkAijGeYW7Sqb\"]}},\"version\":1}", "bytecode": "0x", "deployedBytecode": "0x", "sourceMap": "", "deployedSourceMap": "", "source": "pragma solidity ^0.5.0;\n\nimport \"@openzeppelin/contracts/math/SafeMath.sol\";\nimport \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\nimport \"@openzeppelin/contracts/ownership/Ownable.sol\";\nimport \"@openzeppelin/contracts/lifecycle/Pausable.sol\";\n\ncontract IInvoker {\n\n event Invocation(address invokeAddress, bytes32 invokeDataHash, address kTokenAddress, uint256 tokenAmount);\n event Reward(uint256 poolReward, uint256 platformReward, address tokenAddress);\n\n function invoke(address invokeAddress, bytes calldata invokeData, address kTokenAddress, uint256 tokenAmount)\n external\n payable;\n\n function calculatePoolReward(uint256 tokenAmount) internal view returns (uint256);\n\n function calculatePlatformReward(uint256 tokenAmount) internal view returns (uint256);\n\n function calculateExpectedBalance(uint256 startingBalance, uint256 tokenAmount) internal view returns (uint256);\n\n function poolReward() external view returns (uint256);\n\n function platformReward() external view returns (uint256);\n\n /* Helper hook for invoked transaction */\n\n function currentTokenAmount() external view returns (uint256);\n\n function currentExpectedBalance() external view returns (uint256);\n\n function currentKTokenAddress() external view returns (address);\n\n function currentTokenAddress() external view returns (address);\n\n /* ADMIN FUNCTIONS */\n\n function registerKToken(address kTokenAddress) external;\n\n function setPoolReward(uint256 poolRewardBips) external;\n\n function setPlatformReward(uint256 platformRewardBips) external;\n\n function setPlatformVaultAddress(address platformVaultAddress) external;\n}\n", "sourcePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IInvoker.sol", "ast": { "absolutePath": "/Users/kbrizzle/code/kollateral/protocol/contracts/interfaces/IInvoker.sol", "exportedSymbols": { "IInvoker": [ 1928 ] }, "id": 1929, "nodeType": "SourceUnit", "nodes": [ { "id": 1821, "literals": [ "solidity", "^", "0.5", ".0" ], "nodeType": "PragmaDirective", "src": "0:23:8" }, { "absolutePath": "@openzeppelin/contracts/math/SafeMath.sol", "file": "@openzeppelin/contracts/math/SafeMath.sol", "id": 1822, "nodeType": "ImportDirective", "scope": 1929, "sourceUnit": 2904, "src": "25:51:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "file": "@openzeppelin/contracts/utils/ReentrancyGuard.sol", "id": 1823, "nodeType": "ImportDirective", "scope": 1929, "sourceUnit": 3582, "src": "77:59:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/ownership/Ownable.sol", "file": "@openzeppelin/contracts/ownership/Ownable.sol", "id": 1824, "nodeType": "ImportDirective", "scope": 1929, "sourceUnit": 3018, "src": "137:55:8", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "@openzeppelin/contracts/lifecycle/Pausable.sol", "file": "@openzeppelin/contracts/lifecycle/Pausable.sol", "id": 1825, "nodeType": "ImportDirective", "scope": 1929, "sourceUnit": 2717, "src": "193:56:8", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [], "contractDependencies": [], "contractKind": "contract", "documentation": null, "fullyImplemented": false, "id": 1928, "linearizedBaseContracts": [ 1928 ], "name": "IInvoker", "nodeType": "ContractDefinition", "nodes": [ { "anonymous": false, "documentation": null, "id": 1835, "name": "Invocation", "nodeType": "EventDefinition", "parameters": { "id": 1834, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1827, "indexed": false, "name": "invokeAddress", "nodeType": "VariableDeclaration", "scope": 1835, "src": "293:21:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1826, "name": "address", "nodeType": "ElementaryTypeName", "src": "293:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1829, "indexed": false, "name": "invokeDataHash", "nodeType": "VariableDeclaration", "scope": 1835, "src": "316:22:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" }, "typeName": { "id": 1828, "name": "bytes32", "nodeType": "ElementaryTypeName", "src": "316:7:8", "typeDescriptions": { "typeIdentifier": "t_bytes32", "typeString": "bytes32" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1831, "indexed": false, "name": "kTokenAddress", "nodeType": "VariableDeclaration", "scope": 1835, "src": "340:21:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1830, "name": "address", "nodeType": "ElementaryTypeName", "src": "340:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1833, "indexed": false, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1835, "src": "363:19:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1832, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "363:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "292:91:8" }, "src": "276:108:8" }, { "anonymous": false, "documentation": null, "id": 1843, "name": "Reward", "nodeType": "EventDefinition", "parameters": { "id": 1842, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1837, "indexed": false, "name": "poolReward", "nodeType": "VariableDeclaration", "scope": 1843, "src": "402:18:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1836, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "402:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1839, "indexed": false, "name": "platformReward", "nodeType": "VariableDeclaration", "scope": 1843, "src": "422:22:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1838, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "422:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1841, "indexed": false, "name": "tokenAddress", "nodeType": "VariableDeclaration", "scope": 1843, "src": "446:20:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1840, "name": "address", "nodeType": "ElementaryTypeName", "src": "446:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "401:66:8" }, "src": "389:79:8" }, { "body": null, "documentation": null, "id": 1854, "implemented": false, "kind": "function", "modifiers": [], "name": "invoke", "nodeType": "FunctionDefinition", "parameters": { "id": 1852, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1845, "name": "invokeAddress", "nodeType": "VariableDeclaration", "scope": 1854, "src": "490:21:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1844, "name": "address", "nodeType": "ElementaryTypeName", "src": "490:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1847, "name": "invokeData", "nodeType": "VariableDeclaration", "scope": 1854, "src": "513:25:8", "stateVariable": false, "storageLocation": "calldata", "typeDescriptions": { "typeIdentifier": "t_bytes_calldata_ptr", "typeString": "bytes" }, "typeName": { "id": 1846, "name": "bytes", "nodeType": "ElementaryTypeName", "src": "513:5:8", "typeDescriptions": { "typeIdentifier": "t_bytes_storage_ptr", "typeString": "bytes" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1849, "name": "kTokenAddress", "nodeType": "VariableDeclaration", "scope": 1854, "src": "540:21:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1848, "name": "address", "nodeType": "ElementaryTypeName", "src": "540:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1851, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1854, "src": "563:19:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1850, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "563:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "489:94:8" }, "returnParameters": { "id": 1853, "nodeType": "ParameterList", "parameters": [], "src": "608:0:8" }, "scope": 1928, "src": "474:135:8", "stateMutability": "payable", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1861, "implemented": false, "kind": "function", "modifiers": [], "name": "calculatePoolReward", "nodeType": "FunctionDefinition", "parameters": { "id": 1857, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1856, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1861, "src": "644:19:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1855, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "644:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "643:21:8" }, "returnParameters": { "id": 1860, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1859, "name": "", "nodeType": "VariableDeclaration", "scope": 1861, "src": "688:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1858, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "688:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "687:9:8" }, "scope": 1928, "src": "615:82:8", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": null, "id": 1868, "implemented": false, "kind": "function", "modifiers": [], "name": "calculatePlatformReward", "nodeType": "FunctionDefinition", "parameters": { "id": 1864, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1863, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1868, "src": "736:19:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1862, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "736:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "735:21:8" }, "returnParameters": { "id": 1867, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1866, "name": "", "nodeType": "VariableDeclaration", "scope": 1868, "src": "780:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1865, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "780:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "779:9:8" }, "scope": 1928, "src": "703:86:8", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": null, "id": 1877, "implemented": false, "kind": "function", "modifiers": [], "name": "calculateExpectedBalance", "nodeType": "FunctionDefinition", "parameters": { "id": 1873, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1870, "name": "startingBalance", "nodeType": "VariableDeclaration", "scope": 1877, "src": "829:23:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1869, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "829:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1872, "name": "tokenAmount", "nodeType": "VariableDeclaration", "scope": 1877, "src": "854:19:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1871, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "854:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "828:46:8" }, "returnParameters": { "id": 1876, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1875, "name": "", "nodeType": "VariableDeclaration", "scope": 1877, "src": "898:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1874, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "898:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "897:9:8" }, "scope": 1928, "src": "795:112:8", "stateMutability": "view", "superFunction": null, "visibility": "internal" }, { "body": null, "documentation": null, "id": 1882, "implemented": false, "kind": "function", "modifiers": [], "name": "poolReward", "nodeType": "FunctionDefinition", "parameters": { "id": 1878, "nodeType": "ParameterList", "parameters": [], "src": "932:2:8" }, "returnParameters": { "id": 1881, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1880, "name": "", "nodeType": "VariableDeclaration", "scope": 1882, "src": "958:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1879, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "958:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "957:9:8" }, "scope": 1928, "src": "913:54:8", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1887, "implemented": false, "kind": "function", "modifiers": [], "name": "platformReward", "nodeType": "FunctionDefinition", "parameters": { "id": 1883, "nodeType": "ParameterList", "parameters": [], "src": "996:2:8" }, "returnParameters": { "id": 1886, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1885, "name": "", "nodeType": "VariableDeclaration", "scope": 1887, "src": "1022:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1884, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1022:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1021:9:8" }, "scope": 1928, "src": "973:58:8", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1892, "implemented": false, "kind": "function", "modifiers": [], "name": "currentTokenAmount", "nodeType": "FunctionDefinition", "parameters": { "id": 1888, "nodeType": "ParameterList", "parameters": [], "src": "1111:2:8" }, "returnParameters": { "id": 1891, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1890, "name": "", "nodeType": "VariableDeclaration", "scope": 1892, "src": "1137:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1889, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1137:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1136:9:8" }, "scope": 1928, "src": "1084:62:8", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1897, "implemented": false, "kind": "function", "modifiers": [], "name": "currentExpectedBalance", "nodeType": "FunctionDefinition", "parameters": { "id": 1893, "nodeType": "ParameterList", "parameters": [], "src": "1183:2:8" }, "returnParameters": { "id": 1896, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1895, "name": "", "nodeType": "VariableDeclaration", "scope": 1897, "src": "1209:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1894, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1209:7:8", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1208:9:8" }, "scope": 1928, "src": "1152:66:8", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1902, "implemented": false, "kind": "function", "modifiers": [], "name": "currentKTokenAddress", "nodeType": "FunctionDefinition", "parameters": { "id": 1898, "nodeType": "ParameterList", "parameters": [], "src": "1253:2:8" }, "returnParameters": { "id": 1901, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1900, "name": "", "nodeType": "VariableDeclaration", "scope": 1902, "src": "1279:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1899, "name": "address", "nodeType": "ElementaryTypeName", "src": "1279:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1278:9:8" }, "scope": 1928, "src": "1224:64:8", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1907, "implemented": false, "kind": "function", "modifiers": [], "name": "currentTokenAddress", "nodeType": "FunctionDefinition", "parameters": { "id": 1903, "nodeType": "ParameterList", "parameters": [], "src": "1322:2:8" }, "returnParameters": { "id": 1906, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1905, "name": "", "nodeType": "VariableDeclaration", "scope": 1907, "src": "1348:7:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1904, "name": "address", "nodeType": "ElementaryTypeName", "src": "1348:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "src": "1347:9:8" }, "scope": 1928, "src": "1294:63:8", "stateMutability": "view", "superFunction": null, "visibility": "external" }, { "body": null, "documentation": null, "id": 1912, "implemented": false, "kind": "function", "modifiers": [], "name": "registerKToken", "nodeType": "FunctionDefinition", "parameters": { "id": 1910, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1909, "name": "kTokenAddress", "nodeType": "VariableDeclaration", "scope": 1912, "src": "1414:21:8", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1908, "name": "address", "nodeType": "ElementaryTypeName", "src": "1414:7:8", "stateMutability": "nonpayable", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }